Search This Blog

Friday, January 24, 2014

Open File Dialog WPF Example

WPF > Windows > OpenFileDialog


Open File Dialog  WPF Example

Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
dlg.FileName = "Document";
dlg.DefaultExt = ".doc";
Nullable<bool> result = dlg.ShowDialog();
if (result == true)
{
   string filename = dlg.FileName;
}