Resource

How to use a SaveFileDialog in WPF

VB Developer Resources Aug 12, 2009
The SaveFileDialog class defined in Microsoft.Win32 namespace represents Windows Save File Dialog control.
The SaveFileDialog class defined in Microsoft.Win32 namespace represents Windows Save File Dialog control.

The following code snippet creates a SaveFileDialog, sets its default extension and fiter properties and calls ShowDialog method that displays SaveFileDialog control.


Microsoft.Win32.
SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
dlg.DefaultExt =
".txt";
dlg.Filter =
"Text documents (.txt)|*.txt";
if (dlg.ShowDialog() == true )
{
   string filename = dlg.FileName;
}
post comment
     
COMMENT USING
PREMIUM SPONSORS
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
Get Career Advice from Experts
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts