private static void IniColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorControlPanel ccp = (ColorControlPanel)d; ccp.iniColor = (e.NewValue as SolidColorBrush).Color; ccp.iniColorBrush.Color = ccp.iniColor; }
private static void SelectedColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorControlPanel ccp = (ColorControlPanel)d; if (ccp.outColorBrush != e.NewValue as SolidColorBrush) { ccp.outColorBrush = e.NewValue as SolidColorBrush; ccp.rectSelectedColor.Background = ccp.outColorBrush; } if (ccp.ThumbsInitialised) { if (ccp.useHSV) { ccp.useHSV = false; ccp.AdjustThumbs(ccp.outColorH, ccp.outColorS, ccp.outColorV); } else { ccp.AdjustThumbs(ccp.outColorBrush.Color); } } }