public static void _IsGetCardButtonShown_Changed(DependencyObject o, DependencyPropertyChangedEventArgs args) { CardSetView view = o as CardSetView; if (view != null) { view.btnGetCard.Visibility = (bool)args.NewValue ? Visibility.Visible : Visibility.Collapsed; } }