Frage

When I use pictureBox I can get image location like this (its working fine)

using (Form ps = new PhotoSlider())
{
    (ps.Controls[0] as PictureEdit).Image.Location = e.Item.Caption;
    ps.ShowDialog();
}

But with Devexpress PictureEdit I can't set image location.

Anyone knows how can I do that?

War es hilfreich?

Lösung

I don't think the DevExpress PictureEdit works that way - I can't actually try this because my DevExpress license has expired but assuming e.Item.Caption is a filename, can you do something like

using (Form ps = new PhotoSlider())
    {

        (ps.Controls[0] as PictureEdit).Image= Image.FromFile(e.Item.Caption);
        ps.ShowDialog();
    }

The idea is to set the image property yourself...

Good luck..!

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top