private void FireSelectedColorChangingEvent(Color selectedColor)
 {
     if (SelectedColorChanging != null)
     {
         SelectedColorEventArgs args = new SelectedColorEventArgs(selectedColor);
         SelectedColorChanging(this, args);
     }
 }
        private static void SelectedColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ColorPicker p = d as ColorPicker;

            if (p != null && p.SelectedColorChanged != null)
            {
                SelectedColorEventArgs args = new SelectedColorEventArgs((Color)e.NewValue);
                p.SelectedColorChanged(p, args);
            }
        }
 private void ColorPicker1_SelectedColorChanging(object sender, SelectedColorEventArgs e)
 {
     tbCurrColor1.Text = string.Format("(Changing Event) Selected color: {0}", e.SelectedColor);
 }
 private void ColorPicker1_SelectedColorChanged(object sender, SelectedColorEventArgs args)
 {
     UpdateCurrentColor();
 }
 private static void SelectedColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     ColorPicker p = d as ColorPicker;
     if (p != null && p.SelectedColorChanged != null)
     {
         SelectedColorEventArgs args = new SelectedColorEventArgs((Color) e.NewValue);
         p.SelectedColorChanged(p, args);
     }
 }
 private void FireSelectedColorChangingEvent(Color selectedColor)
 {
     if(SelectedColorChanging != null)
     {
         SelectedColorEventArgs args = new SelectedColorEventArgs(selectedColor);
         SelectedColorChanging(this, args);
     }
 }