Displays the "Save File As" dialog that allows an end-user to save the current diagram to an XML file.
The Diagram Control's Ribbon menu contains the "Save As" button that redirects the save action to the SaveFileAs method. The SaveFileAs method invokes the "Save File As" dialog that allows an end-user to save the current diagram to an XML file.
The full name of the file to which the diagram is saved is automatically assigned to the DiagramControl.DocumentSource property. The DiagramControl.SaveFile method saves the diagram to storage silently if the DiagramControl.DocumentSource property is set. Otherwise, the DiagramControl.SaveFile method delegates the saving action to the SaveFileAs method.
The DiagramControl.ShowingSaveDialog event allows you to replace the standard "Save File As" dialog with a custom one or perform your own actions when this dialog is about to be shown.
To implement diagram custom saving logic, handle the DiagramControl.CustomSaveDocument event.
To save the diagram without invoking any dialogs in code, use the DiagramControl.SaveDocument method.
You may encounter exceptions when loading/saving a diagram (e.g., when trying to load a diagram from a file that does not exist, or saving to a read-only file). To handle or suppress these exceptions, use the DiagramControl.ExceptionMessage event.