Reputation: 274
I am new to DevExpress WinForms , Can any one tell what is simple way to use FileUploader control . I want to select image from File Dialog box and add it to PictureEdit.
Please Help!! Thanks In Advance.
Upvotes: 2
Views: 4323
Reputation: 10246
Unfortunately Devexpress does not provide file upload control ( See This),so that leaves you using native file uploader in your code.
A simple code would be
// Create OpenFileDialog
Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
dlg.Filter = "image Files|*.jpg";
Nullable<bool> result = dlg.ShowDialog();
if (result == true)
{
this.pictureEdit1.Image = Image.FromFile(dlg.FileName) // Not tested this one
}
Hope this helps
Upvotes: 1