void ComponentPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == "CreateAnnotationEnabled") { _buttonCreateAnnotation.IsEnabled = Component.CreateAnnotationEnabled; _btnExtension1.IsEnabled = Component.CreateAnnotationEnabled; _buttonWhyIsTemplateIncomplete.Visibility = Component.CreateAnnotationEnabled ? Visibility.Hidden : Visibility.Visible; TemplateControl.UpdateValid(); } else if (e.PropertyName == "AvailableAnnotationTypes") { // Reinitialize templates list after document is updated SynchronizationContext.Current.Post( delegate { InitializeAnnotationTypeCombo(); } , null); _cmbAnnotationType.Items.Refresh(); _buttonCreateAnnotation.IsEnabled = Component.CreateAnnotationEnabled; _btnExtension1.IsEnabled = Component.CreateAnnotationEnabled; _buttonWhyIsTemplateIncomplete.Visibility = Component.CreateAnnotationEnabled ? Visibility.Hidden : Visibility.Visible; TemplateControl.UpdateValid(); } else if (e.PropertyName == "Preview") { _buttonUserInfo.IsEnabled = Component.UserInfoButtonEnabled; } else if (e.PropertyName == "AnnotationModuleEnabled") { _buttonCreateAnnotation.IsEnabled = Component.CreateAnnotationEnabled; _buttonResetAnnotation.IsEnabled = Component.ResetButtonEnabled; _buttonUserInfo.IsEnabled = Component.UserInfoButtonEnabled; _buttonWhyIsTemplateIncomplete.Visibility = Component.CreateAnnotationEnabled ? Visibility.Hidden : Visibility.Visible; TemplateControl.UpdateValid(); } else if (e.PropertyName == "AnnotationStatus") { AnimateStatusBarText(Component.AnnotationStatus); } }