private static void OnSaturationChanged(DependencyObject relatedObject, DependencyPropertyChangedEventArgs e) { HsvControl control = relatedObject as HsvControl; if ((control != null) && !control.m_withinUpdate) { control.UpdateThumbPosition(); } }
private static void OnHueChanged(DependencyObject relatedObject, DependencyPropertyChangedEventArgs e) { HsvControl control = relatedObject as HsvControl; if ((control != null) && !control.m_withinUpdate) { control.UpdateSelectedColor(); } }
private static void OnValueChanged( DependencyObject relatedObject, DependencyPropertyChangedEventArgs e) { HsvControl hsvControl = relatedObject as HsvControl; if (hsvControl != null && !hsvControl.m_withinUpdate) { hsvControl.UpdateThumbPosition(); } }
public override void OnApplyTemplate() { base.OnApplyTemplate(); this.m_redColorSlider = base.GetTemplateChild("PART_RedColorSlider") as ColorSlider; this.m_greenColorSlider = base.GetTemplateChild("PART_GreenColorSlider") as ColorSlider; this.m_blueColorSlider = base.GetTemplateChild("PART_BlueColorSlider") as ColorSlider; this.m_alphaColorSlider = base.GetTemplateChild("PART_AlphaColorSlider") as ColorSlider; this.m_spectrumSlider = base.GetTemplateChild("PART_SpectrumSlider1") as SpectrumSlider; this.m_hsvControl = base.GetTemplateChild("PART_HsvControl") as HsvControl; this.m_templateApplied = true; this.UpdateControlColors(this.SelectedColor); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); m_redColorSlider = GetTemplateChild(RedColorSliderName) as ColorSlider; m_greenColorSlider = GetTemplateChild(GreenColorSliderName) as ColorSlider; m_blueColorSlider = GetTemplateChild(BlueColorSliderName) as ColorSlider; m_alphaColorSlider = GetTemplateChild(AlphaColorSliderName) as ColorSlider; m_satSlider = GetTemplateChild(SatSliderName) as HSVSlider; m_valSlider = GetTemplateChild(ValSliderName) as HSVSlider; m_colorHex = GetTemplateChild(ColorHexName) as ColorHex; m_hsvControl = GetTemplateChild(HsvControlName) as HsvControl; m_hueWheel = GetTemplateChild(HueWheelName) as HueWheel; m_hueSlider = GetTemplateChild(HueSliderName) as SpectrumSlider; m_templateApplied = true; UpdateControlColors(SelectedColor); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); m_redColorSlider = GetTemplateChild(RedColorSliderName) as ColorSlider; m_greenColorSlider = GetTemplateChild(GreenColorSliderName) as ColorSlider; m_blueColorSlider = GetTemplateChild(BlueColorSliderName) as ColorSlider; m_alphaColorSlider = GetTemplateChild(AlphaColorSliderName) as ColorSlider; m_spectrumSlider = GetTemplateChild(SpectrumSliderName) as SpectrumSlider; m_hsvControl = GetTemplateChild(HsvControlName) as HsvControl; m_templateApplied = true; UpdateControlColors(SelectedColor); }
private static void OnThumbDragDelta(object sender, DragDeltaEventArgs e) { HsvControl hsvControl = sender as HsvControl; hsvControl.OnThumbDragDelta(e); }