打开一个文件夹,并使用WPF突出显示一个特定的文件
发布时间:2020-12-13 20:49:58 所属栏目:Windows 来源:网络整理
导读:有没有办法启动资源管理器窗口并使用WPF突出显示该文件夹中的文件?我已经尝试过以下操作: Process ExplorerWindowProcess = new Process();ExplorerWindowProcess.StartInfo.FileName = "explorer.exe";ExplorerWindowProcess.StartInfo.Arguments = Confi
有没有办法启动资源管理器窗口并使用WPF突出显示该文件夹中的文件?我已经尝试过以下操作:
Process ExplorerWindowProcess = new Process(); ExplorerWindowProcess.StartInfo.FileName = "explorer.exe"; ExplorerWindowProcess.StartInfo.Arguments = ConfigFile.File.FullName; ExplorerWindowProcess.Start(); …但是在Windows资源管理器中打开文件(在我的例子中是一个XML文件)与默认应用程序,我非常不希望。我知道Eclipse可以使用的Aptana工具允许您在Eclipse项目浏览器中选择一个文件,并在Explorer中完全按照我的要求显示文件,但是我需要一种在WPF应用程序中实现的方法。
Explorer命令行参数
http://support.microsoft.com/kb/152457 Explorer [/n] [/e] [(,)/root,<object>] [/select,<object>] /n Opens a new single-pane window for the default selection. This is usually the root of the drive Windows is installed on. If the window is already open,a duplicate opens. /e Opens Windows Explorer in its default view. /root,<object> Opens a window view of the specified object. /select,<object> Opens a window view with the specified folder,file or application selected. 你也可以像这样在文件名上放置引号: startInfo.FileName = "explorer.exe"; startInfo.Arguments = "/select,"" + ConfigFile.File.FullName + """; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- EXTJS Ext.Window Scroll
- Windows Phone应用程序仅在从商店下载时崩溃
- Windows窗体中的C#垂直标签
- WiX:防止32位安装程序在64位Windows上运行
- MFC动态链接库和WIN32动态链接库 及区别
- windows – 将.exe包装到MSI中的最佳(免费)工具是什么?
- windows-server-2008 – 访问被拒绝的问题,Windows Server
- 对于ARM Windows GCC工具链,Eclipse无法识别stdint.h中的类
- Windows下MariaDB数据库安装图文教程
- windows-server-2008 – Windows Server 2008开始菜单,在右
推荐文章
站长推荐
- DevExpress20:XtraCharts控件实现图表
- Windows Embedded Compact 7上真正的Silverlight
- uwp – 对Microsoft Store API的请求始终返回空的
- windows – 如何将我的OpenGL应用程序置于全屏模
- windows-phone-7 – WP7 Mango中的相机捕捉
- windows – 如何在TortoiseSVN上查看锁定消息
- windows-server-2003 – IIS6,Windows 2003 Serv
- 窗口 – 这些十六进制命名文件夹来自哪里?
- osx – 显示所有Windows操作系统X键盘快捷方式的
- 单元测试 – 如何在实际项目中的Microsoft Dynam
热点阅读