예제 #1
0
        private static void selectedColor_changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            colorpickerlib cPicker  = (colorpickerlib)d;
            Color          newValue = (Color)e.NewValue;

            cPicker.OnSelectedColorChanged((Color)e.OldValue, newValue);

            if (cPicker.m_ColorMarker != null)
            {
                if (newValue.A > 150)
                {
                    cPicker.m_ColorMarker.Stroke = new SolidColorBrush(Color.FromArgb(255, (byte)(255 - newValue.R), (byte)(255 - newValue.G), (byte)(255 - newValue.B)));
                }
                else
                {
                    cPicker.m_ColorMarker.Stroke = Brushes.Black;
                }
            }
        }
예제 #2
0
        private static void HexadecimalStringChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            colorpickerlib c = (colorpickerlib)d;

            c.OnHexadecimalStringChanged((string)e.OldValue, (string)e.NewValue);
        }
예제 #3
0
        private static void ScBChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            colorpickerlib c = (colorpickerlib)d;

            c.OnScBChanged((float)e.NewValue);
        }