private static void OnPreviewColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorPickerControl control = d as ColorPickerControl; if (control != null) { Color newColor = (Color)e.NewValue; control.brightnessSlider.Value = ImageProcessingUtils.BrightnessFromColor(newColor); control.previewColorGrid.Background = new SolidColorBrush(newColor); } }
private static void OnCurrentColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorPickerControl control = d as ColorPickerControl; if (control != null) { Color newColor = (Color)e.NewValue; control._originalColor = newColor; control.currentColorGrid.Background = new SolidColorBrush(newColor); } }