2

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.

Gayatri
  • 274
  • 1
  • 4
  • 17

1 Answers1

1

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

Rohit
  • 10,056
  • 7
  • 50
  • 82