I would like to add some checks to my OpenFileDialog to show All files except .exe and .jar.
var openFileDialog = new Microsoft.Win32.OpenFileDialog
{
Title = @"Upload File",
Filter =
@"All Files|*.*|Text File (.txt)|*.txt|Word File (.docx ,.doc)|*.docx;*.doc|PDF (.pdf)|*.pdf|Spreadsheet (.xls ,.xlsx)| *.xls ;*.xlsx|Presentation (.pptx ,.ppt)|*.pptx;*.ppt",
FilterIndex = 1,
RestoreDirectory = true
};
The all files options allows All files . Not just all files of the type specified after . If the user selects one type , ssay .txt from the drop down , the other files are not shown. But the all files option shows ALL files including exe and jar.
I want to implement an option where I specifiy 5 file types , like above , and the All files option simply shows all the 5 file types together instead of ALL file types.