Current location - Quotes Website - Signature design - WPF inkcanvas is saved as a picture, how to enter a save name and choose a save path.
WPF inkcanvas is saved as a picture, how to enter a save name and choose a save path.
Use Microsoft. Win32.SaveFileDialog

var? cdlg? =? New? Microsoft. win32 . SaveFileDialog();

cdlg。 Filter? =? "Picture file (*. jpg*.bmp)|*。 jpg*.BMP”;

cdlg。 Title? =? "save";

cdlg。 Initial directory? =? environment GetFolderPath (environment. special folder . my pictures);

What if? (cdlg。 ShowDialog (this)? ==? True)

{

MessageBox。 Show (cdlg. File name);

//? Add the code to save the file here.

}