private void OnAnnotationsDeselected(object sender, AnnotationsEventArgs e) { if (e.Annotations.Count > 0) { this.DeselectAnnotationsInAnnotationNav(e.Annotations); } }
private void OnAnnotationCreated(object sender, AnnotationsEventArgs e) { foreach (var annot in e.Annotations) { if (!String.IsNullOrWhiteSpace(this.AnnotationAuthor)) { annot.Author = this.AnnotationAuthor; } //this.AnnotationManager.SelectAnnotation(annot); } // Switch tool mode to annotation edit, if created annotation // is not a TextMarkup/FreeHand annotation for UX puposes if (e.Annotations.Count == 1) { var annot = e.Annotations[0]; if (annot as TextMarkup == null && annot as FreeHand == null) { this.DocumentViewer.ToolMode = DocumentViewer.ToolModes.AnnotationEdit; } } }
private void OnAnnotationSelected(object sender, AnnotationsEventArgs e) { // Don't show properties if 0 or more than 1 annotation is selected if (e.Annotations.Count != 1) { this.SetAndBindProperties(null); return; } this.SelectedAnnotation = e.Annotations[0]; var selectedMarkup = this.SelectedAnnotation as Markup; this.SetAndBindProperties(selectedMarkup); }
private void OnAnnotationDeselected(object sender, AnnotationsEventArgs e) { if (this.DocumentViewer.AnnotationManager.SelectedAnnotations.Count == 1) { this.SetAndBindProperties(null); this.SelectedAnnotation = this.DocumentViewer.AnnotationManager.SelectedAnnotations[0]; var selectedMarkup = this.SelectedAnnotation as Markup; this.SetAndBindProperties(selectedMarkup); } else if (this.SelectedAnnotation != null && e.Annotations.Contains(this.SelectedAnnotation)) { this.SetAndBindProperties(null); } }
private void OnAnnotationsSelected(object sender, AnnotationsEventArgs e) { if (e.Annotations.Count > 0) { this.SelectAnnotationsInAnnotationNav(e.Annotations); } }
private void OnAnnotationSelected(object sender, AnnotationsEventArgs e) { // Don't show properties if 0 or more than 1 annotation is selected if (e.Annotations.Count != 1) { this.SetAndBindProperties(null); return; } this.SelectedAnnotation = e.Annotations[0]; var selectedMarkup = this.SelectedAnnotation as Markup; this.SetAndBindProperties(selectedMarkup); }
private void OnAnnotationDeselected(object sender, AnnotationsEventArgs e) { if (this.DocumentViewer.AnnotationManager.SelectedAnnotations.Count == 1) { this.SetAndBindProperties(null); this.SelectedAnnotation = this.DocumentViewer.AnnotationManager.SelectedAnnotations[0]; var selectedMarkup = this.SelectedAnnotation as Markup; this.SetAndBindProperties(selectedMarkup); } else if( this.SelectedAnnotation != null && e.Annotations.Contains(this.SelectedAnnotation)) { this.SetAndBindProperties(null); } }
private void OnAnnotationCreated(object sender, AnnotationsEventArgs e) { foreach (var annot in e.Annotations) { if( !String.IsNullOrWhiteSpace(this.AnnotationAuthor) ) annot.Author = this.AnnotationAuthor; //this.AnnotationManager.SelectAnnotation(annot); } // Switch tool mode to annotation edit, if created annotation // is not a TextMarkup/FreeHand annotation for UX puposes if (e.Annotations.Count == 1) { var annot = e.Annotations[0]; if (annot as TextMarkup == null && annot as FreeHand == null) { this.DocumentViewer.ToolMode = DocumentViewer.ToolModes.AnnotationEdit; } } }