当前位置:网站首页>WPF select Folder
WPF select Folder
2022-06-21 22:34:00 【zLulus】
The effect is as shown in the picture 
Use FolderBrowserDialog
System.Windows.Forms.FolderBrowserDialog dialog = new System.Windows.Forms.FolderBrowserDialog();
System.Windows.Forms.DialogResult result = dialog.ShowDialog();
if (result == System.Windows.Forms.DialogResult.Cancel)
{
return;
}
selectFolrderPathTextBlock.Text = dialog.SelectedPath.Trim();
Use FolderBrowserDialog
// quote WindowsAPICodePack
var dialog = new CommonOpenFileDialog();
dialog.IsFolderPicker = true;
CommonFileDialogResult result = dialog.ShowDialog();
if (result == CommonFileDialogResult.Ok)
{
selectFolrderPathTextBlock.Text = dialog.FileName;
}
Sample code
Reference material
OpenFileDialog In WPF
C# OPENFILEDIALOG Open the file dialog ( Detailed explanation )
边栏推荐
- gdb调试技巧(0)gdb入门
- WPF 数据绑定:数据源Source-目标Target
- 迅为iTOP-3568开发板安装 RKNN Toolkit Lite2
- es7创建索引模板
- Use the do while loop to calculate the odd and even sums in 1-100 [method 1]
- pi4j针脚模拟总线,进行控制传输和数据传输的几种思路
- 班主任让开股票账户,在启牛开户安全吗?
- IP guard printing control to prevent information disclosure of printing channels
- Fedora 36 编译安装opencv 4.6.0 —— 筑梦之路
- 专业字体设计编辑Glyphs 3
猜你喜欢

Paml| Shengxin software for calculating dn/ds value
![class path resource [classpath*:mapper/*.xml] cannot be opened because it does not exist](/img/1a/294eb0128285686ede415991f69be7.png)
class path resource [classpath*:mapper/*.xml] cannot be opened because it does not exist

UEFI dual system + dual hard disk installation

Sampler collection

Second understanding microservice

js 监听和移除监听事件

Technology sharing | a clustering incremental statistical SQL requirement in MySQL

【深入理解TcaplusDB技术】 Tmonitor模块架构
![[deeply understand tcapulusdb technology] tcapulusdb import data](/img/a8/04c4c6703a6137d17666f211d7988d.png)
[deeply understand tcapulusdb technology] tcapulusdb import data

MitoZ|Multi-Kmer mode
随机推荐
es7创建索引模板
js 监听和移除监听事件
Introduction to class library, framework, module, component and other concepts
Use the while loop to calculate the odd and even sums in 1-100 [method 1]
Nacos installation guide
Qt滚动区域QScrollArea
【深入理解TcaplusDB技術】TcaplusDB構造數據
Leetcode question brushing: SF Technology Smart logistics Campus Technology Challenge
IP guard printing control to prevent information disclosure of printing channels
【深入理解TcaplusDB技术】TcaplusDB业务数据备份
Hiclotter|hic data visualization tool
GDB debugging skills (0) getting started with GDB
Introduction to software architecture
Use the do while loop to calculate the odd and even sums in 1-100 [method 2]
celery+rabbit分布式任务处理
Li Kou: Change
GDB debugging practice (10) multi thread debugging
Jeu de boutons de force 4 (version MySQL)
Use the for loop to calculate the odd and even sums in 1-100 [method 2]
将字符串按长度截取成数组