private static void OnPermitsEditChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { SourceUC control = source as SourceUC; bool permits = (bool)e.NewValue; if (!permits) { control.btnRemoveComment.Visibility = Visibility.Hidden; } }
private static void OnCanReorderChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { SourceUC control = source as SourceUC; bool can = (bool)e.NewValue; if (!can) { control.btnReposition.Visibility = Visibility.Collapsed; } else { control.btnReposition.Visibility = Visibility.Visible; } }