Esempio n. 1
0
        private void WrapPanel1_MouseMove(object sender, MouseEventArgs e)
        {
            ColorPaletteItem cpi = e.Source as ColorPaletteItem;

            SolidColorBrush scb = cpi.rect.Fill as SolidColorBrush;

            CurrentColor = scb.Color;

            PaletteEventArgs newEventArgs = new PaletteEventArgs(this, CurrentColor)
            {
                RoutedEvent = ColorPaletteMouseMove
            };

            RaiseEvent(newEventArgs);
        }
Esempio n. 2
0
        private void WrapPanel1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            ColorPaletteItem cpi = e.Source as ColorPaletteItem;

            SolidColorBrush scb = cpi.rect.Fill as SolidColorBrush;

            SelectedColor = scb.Color;

            PaletteEventArgs newEventArgs = new PaletteEventArgs(this, SelectedColor)
            {
                RoutedEvent = ColorPaletteSelect
            };

            RaiseEvent(newEventArgs);
        }