'Declaration
Public Property AllowDropFile As Boolean
public bool AllowDropFile {get; set;}
public read-write property AllowDropFile: Boolean;
public function get,set AllowDropFile : boolean
If this property is set to true and a file is dropped within the control, the DropFile event, respectively the PreviewDropFile event, is raised.
'Declaration
Public Property AllowDropFile As Boolean
public bool AllowDropFile {get; set;}
public read-write property AllowDropFile: Boolean;
public function get,set AllowDropFile : boolean
'We assume that the GdViewer1 control has been properly integrated 'and the event has been properly added as well. 'Allowing to drop files. GdViewer1.AllowDropFile = True 'Define the event. Sub GdViewer1_DropFile(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.DropFileEventArgs) If e.File.Length > 0 Then If GdViewer1.DisplayFromFile(e.File[0]) <> GdPictureStatus.OK Then MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.AllowDropFile") Endif Endif End Sub
//We assume that the GdViewer1 control has been properly integrated //and the event has been properly added as well. //Allowing to drop files. GdViewer1.AllowDropFile = true; //Define the event. void GdViewer1_DropFile(object sender, GdPicture14.WPF.GdViewer.DropFileEventArgs e) { if (e.File.Length > 0) if (GdViewer1.DisplayFromFile(e.File[0]) != GdPictureStatus.OK) MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.AllowDropFile"); }