private void InitializeColorBoard() { colorBoard = new ColorBoard(); colorBoard.IsTabStop = true; colorBoard.MouseLeftButtonDown += new MouseButtonEventHandler(ColorBoard_MouseLeftButtonDown); colorBoard.KeyDown += new KeyEventHandler(ColorBoard_KeyDown); colorBoard.SizeChanged += new SizeChangedEventHandler(ColorBoard_SizeChanged); colorBoard.DoneClicked += new RoutedEventHandler(ColorBoard_DoneClicked); }
private static void OnColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorBoard control = d as ColorBoard; if (control != null && control.rootElement != null) { if (control.Updating) { return; } Color color = (Color)e.NewValue; control.UpdateControls(color, true, true, true); } }