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;
}
COMMENT USING
PREMIUM SPONSORS
Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.
Tags
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.