private void OnAnnotationDeselected(object sender, AnnotationsDeselectedEventArgs 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.DeselectedAnnotations.Contains(this.SelectedAnnotation)) { this.SetAndBindProperties(null); } }
private void OnAnnotationDeselected(object sender, AnnotationsDeselectedEventArgs 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.DeselectedAnnotations.Contains(this.SelectedAnnotation)) { this.SetAndBindProperties(null); } }