예제 #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 25 "..\..\..\..\ColorPickerDemo\ColorForm.xaml"
                ((System.Windows.Controls.TextBlock)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.TextBlock_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 2:

            #line 26 "..\..\..\..\ColorPickerDemo\ColorForm.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.ColorPicker = ((ColorPicker.ColorPicker)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #2
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            m_popup        = GetTemplateChild("PART_Popup") as UIElement;
            m_colorPicker  = GetTemplateChild("PART_ColorPicker") as ColorPicker;
            m_toggleButton = GetTemplateChild("PART_ToggleButton") as ToggleButton;

            if (m_colorPicker != null)
                m_colorPicker.SelectedColor = SelectedColor;
        }
예제 #3
0
 void colorSelector_ColorChanged(object sender, ColorPicker.EventArgs<Color> e)
 {
     SetValue(SelectedColorProperty, e.Value.WithAlpha(alphaDisplay.Alpha ));
     if (SelectedColorChanged != null)
     {
         SelectedColorChanged(this, new EventArgs<Color>(SelectedColor));
     }
 }
예제 #4
0
 void alphaDisplay_AlphaChanged(object sender, ColorPicker.EventArgs<byte> e)
 {
     SetValue(SelectedColorProperty,SelectedColor.WithAlpha(e.Value));
     if (SelectedColorChanged != null)
     {
         SelectedColorChanged(this, new EventArgs<Color>(SelectedColor));
     }
 }
예제 #5
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 25 "..\..\..\..\ColorPickerDemo\ColorForm.xaml"
     ((System.Windows.Controls.TextBlock)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.TextBlock_MouseLeftButtonDown);
     
     #line default
     #line hidden
     return;
     case 2:
     
     #line 26 "..\..\..\..\ColorPickerDemo\ColorForm.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.ColorPicker = ((ColorPicker.ColorPicker)(target));
     return;
     }
     this._contentLoaded = true;
 }
예제 #6
0
 void Start()
 {
     image         = GetComponent <Image>();
     picker        = transform.parent.GetComponent <ColorPicker>();
     rectTransform = GetComponent <RectTransform>();
 }
예제 #7
0
 void Awake()
 {
     myself = this;
 }
예제 #8
0
 // Use this for initialization
 void Start()
 {
     image  = GetComponent <Image>();
     picker = GameObject.Find("Panel").GetComponent <ColorPicker>();
 }
예제 #9
0
        private static void OnHsvControlSelectedColorChanged(object sender, RoutedPropertyChangedEventArgs <Color> e)
        {
            ColorPicker colorPicker = sender as ColorPicker;

            colorPicker.OnHsvControlSelectedColorChanged(e);
        }
예제 #10
0
        private static void OnSliderValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            ColorPicker colorPicker = sender as ColorPicker;

            colorPicker.OnSliderValueChanged(e);
        }