private static void IsNewlyUnlockedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ConversionBtn cBtn = (ConversionBtn)d; bool val = (bool)e.NewValue; if (val) { cBtn.newlyUnlockedStoryBoard.Begin(); } else { cBtn.newlyUnlockedStoryBoard.Stop(); } }
private static void HasMeasurementsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ConversionBtn cBtn = (ConversionBtn)d; bool val = (bool)e.NewValue; if (val) { cBtn.notAvailableImg.Visibility = Visibility.Collapsed; cBtn.btnGrid.Background = cBtn.activatedBG; //cBtn.Opacity = 1.0; } else { cBtn.notAvailableImg.Visibility = Visibility.Visible; cBtn.btnGrid.Background = cBtn.deactivatedBG; //cBtn.Opacity = 0.7; } //cBtn.HasMeasurements = val; }