c# - FileDialog filter not updating when changing selection -


i have simple issue. have filedialog in wpf application. things works fine when run application first time. when change file extension, , change back, dont see anything.

this code:

filedlg.filename = "*.msr"; // default file name filedlg.defaultext = ".msr"; // default file extension filedlg.filter = "raw (.msr)| *.msr | files |*.*" ; // filter files extension  

i see .msr files. choose see files , switch .msr extension. dont see files.

thoughts?

kindly ask details if required.

if using filter property, defaultext gets ignored or in worst case can cause issues. need use filterindex instead mark default extension. can find out more here.

i skip setting file name *.msr.


Comments