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

前端 未结 4 1749
悲&欢浪女
悲&欢浪女 2021-02-13 17:57

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 do

相关标签:
4条回答
  • 2021-02-13 18:36

    we use Ookii Dialogs in our projects. They have the windows-look and feel and the typical options for filtering etc.

    0 讨论(0)
  • 2021-02-13 18:40

    The Ookii Dialogs for WPF library has a VistaFolderBrowserDialog class that provides a complete implementation of a folder browser dialog for WPF.

    https://github.com/augustoproiete/ookii-dialogs-wpf

    There's also a version compatible with Windows Forms apps

    0 讨论(0)
  • 2021-02-13 18:43

    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.

    0 讨论(0)
  • 2021-02-13 18:52

    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.

    0 讨论(0)
提交回复
热议问题