Gayatri
Gayatri

Reputation: 274

FileUpload Control For DevExpress Windows Form

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

Answers (1)

Rohit
Rohit

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

Related Questions