Exemple #1
0
 public void onButtonClicked(object sender, RoutedEventArgs e)
 {
     ColorPalette.currentColor = colorValue;
     colorValue = ColorPalette.currentColor;
     colorValue = ColorPalette.currentColor;
     //notify property change?
 }
Exemple #2
0
 public ColorButton(Brush bgColor, ColorPalette.Value value)
 {
     colorValue           = value;
     this.Width           = 90;
     this.Height          = 90;
     this.Background      = bgColor;
     this.BorderThickness = new Thickness(0);
     this.Click          += new RoutedEventHandler(onButtonClicked);
 }
Exemple #3
0
 public ColorButtonCollection()
 {
     for (int i = (int)ColorPalette.Value.RED; i < ColorPalette.MAX_NUM; ++i)
     {
         ColorButton button = new ColorButton(ColorPalette.brush[(int)color], color);
         color = (ColorPalette.Value)((int)color + 1);
         buttons.Add(button);
     }
 }