var dlg = new SaveFileDialog();
dlg.FileName = "graph";
dlg.DefaultExt = ".bmp";
dlg.Filter = "PNG|*.png|DOT|*.dot|Windows Bitmap Format|*.bmp|GIF|*.gif|JPEG|*.jpg|PDF|*.pdf|Scalable Vector Graphics|*.svg|Tag Image File Format|*.tiff";
該擴展總是默認爲.png
。看起來DefaultExt
被忽略,如果有Filter
;那麼它只是默認爲列表中的第一個選項。WPF SaveFileDialog DefaultExt被忽略?
有沒有辦法迫使它真正尊重默認的分機?