The text of this article is not in this database — only its details are. Read it on the old site: OpenFileDialog In WPF
17 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: OpenFileDialog In WPF
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Kristina OncevaPosted Mar 23, 2024, 6:13 PM
Worthless solution
herb auldPosted Sep 10, 2023, 6:05 PM
Your documented code does not match your "OpenFileDlgSample.zip" code.
Former memberPosted Sep 6, 2022, 1:47 PM
How come this code not compile . ROFL look who wrote it now we no why
sachin chavanPosted Aug 5, 2021, 3:50 PM
Sir, You use Win32 to open file dialog in WPF. I use C# and XAML on .Net Core 3.1 Visual Studio 2019 v16.10 So if i use Microsoft.Win32.OpenFileDialog will it still be managed code?
Sarvesh UpadhyayPosted Sep 30, 2018, 2:41 PM
Sir i want to insert image in sql server and retrive back in wpf sir please help me
Rushi MehtaPosted Aug 27, 2018, 5:51 AM
Nicely Exaplin
Bhairab DuttPosted Aug 27, 2018, 1:58 AM
Nice Article ....
Mahesh ChandPosted Aug 26, 2018, 10:50 PM
You're welcome guys. Article is updated with update code and formatting.
Arthur ArapetianPosted Apr 25, 2017, 5:14 PM
Thank you, Mahesh!
Sumit SharmaPosted Mar 21, 2017, 2:31 AM
How to select only folder path?
Ramesh PalaniappanPosted Sep 7, 2016, 11:58 AM
Nice
MoThA MoThAPosted Jan 19, 2014, 7:52 AM
Hi, what's the difference between your code and the following one ... private OpenFileDialog openFileDialog = null; public MainWindow() { InitializeComponent(); openFileDialog = new OpenFileDialog(); openFileDialog.DefaultExt = ".txt"; openFileDialog.Filter = "Text documents (.txt |*.txt*"; openFileDialog.FileOk = openFileDialogFileOk; } private void openFileClick(object sender, RoutedEventArgs e) { openFileDialog.ShowDialog(); } }
btPosted Aug 19, 2010, 6:11 AM
Be aware that the Microsoft.Win32.OpenFileDialog shows a different dialog that the System.Windows.Forms.OpenFileDialog.
Stephan MalewschikPosted Oct 5, 2009, 10:36 AM
hi mahesh, thx for the nice description of how to open a file dialog it's simple and easy to use normally my problem is that i cant open a file dialog out of a menu item of a menu, that has an MouseDown event which calls a method that creates an OpenFileDialog-object