예제 #1
0
 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);
 }
예제 #2
0
파일: ColorBoard.cs 프로젝트: vovus/curves
        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);
            }
        }