private void InitializeColorBoard() { colorBoard = new ColorBoard(); colorBoard.IsTabStop = true; colorBoard.PointerPressed += colorBoard_PointerPressed; colorBoard.KeyDown += 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); } }