WPF C#中的FolderBrowserDialog [英] FolderBrowserDialog in wpf c#

查看:106
本文介绍了WPF C#中的FolderBrowserDialog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是System.Windows;System.Windows.Controls;,所以我不能使用System.Windows.Forms;,因为它们之间有很多类似消息框和列表框的控件……它们之间很常见,还有另一种解决方法来获取folderbrowserdialog,而无需使用System.Windows.Forms;还是有获取文件夹位置"对话框?

I am using System.Windows; and System.Windows.Controls; so I can't use System.Windows.Forms; because there is a lot of controls like messagebox and list box...etc are common between them is there another solution to get folderbrowserdialog without using System.Windows.Forms; or is there any get folder location dialog box ?

推荐答案

您可以使用FolderBrowserDialog;要么将命名空间显式地放在类的前面...

You can use the FolderBrowserDialog; either explicitly place the namespace in front of the class...

System.Windows.Forms.FolderBrowserDialog browse = new System.Windows.Forms.FolderBrowserDialog();

...或创建别名关于您的名称空间.

...or create an alias with regard to your namespace.

Imports [ aliasname = ] namespace

这篇关于WPF C#中的FolderBrowserDialog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆