private void OnToolModeChanged(object sender, ToolModeChangedEventArgs e) { if (e.NewToolMode != SilverDox.Controls.DocumentViewer.ToolModes.AnnotationEdit) { this.DocumentViewer.AnnotationManager.DeselectAllAnnotations(); } if (e.NewToolMode.ToString().StartsWith("AnnotationCreate")) { Markup defaultAnnotation = (this.DocumentViewer.AnnotationManager != null) ? (DocumentViewer.AnnotationManager.DefaultAnnotation as Markup) : (null); if (defaultAnnotation != null) { this.SetAnnotationDefaultProperties(defaultAnnotation); } } }
private void OnToolModeChanged(object sender, ToolModeChangedEventArgs e) { if( e.NewToolMode != SilverDox.Controls.DocumentViewer.ToolModes.AnnotationEdit) this.DocumentViewer.AnnotationManager.DeselectAllAnnotations(); if (e.NewToolMode.ToString().StartsWith("AnnotationCreate")) { Markup defaultAnnotation = (this.DocumentViewer.AnnotationManager != null) ? (DocumentViewer.AnnotationManager.DefaultAnnotation as Markup) : (null); if (defaultAnnotation != null) { this.SetAnnotationDefaultProperties(defaultAnnotation); } } }