Inheritance: System.Windows.Controls.Control
示例#1
0
        private static void OnSaturationChanged(DependencyObject relatedObject, DependencyPropertyChangedEventArgs e)
        {
            HsvControl control = relatedObject as HsvControl;

            if ((control != null) && !control.m_withinUpdate)
            {
                control.UpdateThumbPosition();
            }
        }
示例#2
0
        private static void OnHueChanged(DependencyObject relatedObject, DependencyPropertyChangedEventArgs e)
        {
            HsvControl control = relatedObject as HsvControl;

            if ((control != null) && !control.m_withinUpdate)
            {
                control.UpdateSelectedColor();
            }
        }
示例#3
0
        private static void OnValueChanged(
            DependencyObject relatedObject, DependencyPropertyChangedEventArgs e)
        {
            HsvControl hsvControl = relatedObject as HsvControl;

            if (hsvControl != null && !hsvControl.m_withinUpdate)
            {
                hsvControl.UpdateThumbPosition();
            }
        }
示例#4
0
 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);
 }
示例#5
0
 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);
 }
示例#6
0
        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);
        }
示例#7
0
        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);
        }
示例#8
0
        private static void OnThumbDragDelta(object sender, DragDeltaEventArgs e)
        {
            HsvControl hsvControl = sender as HsvControl;

            hsvControl.OnThumbDragDelta(e);
        }