Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# - WPF - getting folder browser dialog without using System.Windows.Forms?

I have this WPF app and I want to have there function of getting a directory path from the user. I would like to use some folder browser dialog but I don't want to implement it from System.Windows.Forms or use some huge script inside. Is there some path getting dialog in WPF already implemented?

I have read answers to similar questions here but it was full of System.Windows.Forms..

I haven't found anything like that in the Toolbox and I'm starting with WPF so I could use some help.

Thank you in advance :]

like image 990
Ms. Nobody Avatar asked Apr 30 '13 16:04

Ms. Nobody


2 Answers

There are no standard native WPF dialogs for what you are looking for, simply because the System.Windows.Forms dialogs are nothing more than wrappers to the system ones. So creating a WPF wrapper makes no sense and will only add to the confusion.

like image 68
Vladimir Petrov Avatar answered Sep 18 '22 18:09

Vladimir Petrov


See my answer to Select folder dialog WPF. Basically the Windows Presentation Foundation 4.5 Cookbook recommends that you use the Windows® API Code Pack for Microsoft® .NET Framework if you need a folder browser.

like image 31
T Powers Avatar answered Sep 21 '22 18:09

T Powers