void OnCustomSaveDocument(object sender, DiagramCustomSaveDocumentEventArgs e) { var diagramName = (string)e.DocumentSource; Text = diagramName; var stream = new MemoryStream(); diagramControl1.SaveDocument(stream); var diagramData = stream.ToArray(); DiagramRepository.SaveDiagramData(diagramName, diagramData); e.Handled = true; }
/// <summary> /// Override the behaviour of the quick access save button /// </summary> /// <param name="e">The <see cref="DiagramShowingSaveDialogEventArgs"/></param> protected override void OnCustomSaveDocument(DiagramCustomSaveDocumentEventArgs e) { this.SaveCommand.Execute(null); }