我在OpenFileDialog的Filter属性中具有多个扩展名.是否可以隐藏扩展名并仅显示说明?
样品:
dialog.Filter = "Image files|*.bmp;*.jpg; many image file extensions here"
我只想在文件类型组合框中显示文本:“图像文件”,因为扩展名字符串很长.这可能吗?
解决方法:
这应该工作:
dialog.Filter = "All Supported Audio | *.mp3; *.wma | MP3s | *.mp3 | WMAs | *.wma";
dialog.AutoUpgradeEnabled = false; //using FileDialog.AutoUpgradeEnabled = false it will display the old XP sytle dialog box, which then displays correctly
dialog.ShowDialog();