How To Use OpenFileDialog In WPF

WPF has it’s own encapsulated version of OpenFileDialog. You can find this under Microsoft.Win32 namespace.

Sample code:

 Microsoft.Win32.OpenFileDialog _ofd = new Microsoft.Win32.OpenFileDialog();
_ofd.ShowDialog();

Leave a comment