Inheritance: System.Windows.Controls.Control
Ejemplo n.º 1
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (Popup != null)
            {
                Popup.Opened -= OnPopupOpened;
            }

            if (_button != null)
            {
                _button.PreviewMouseLeftButtonDown -= OnButtonClick;
            }

            Popup   = GetTemplateChild("PART_Popup") as Popup;
            _panel  = GetTemplateChild("PART_Panel") as ColorPickerPanel;
            _button = GetTemplateChild("PART_Button") as ToggleButton;

            if (Popup != null)
            {
                Popup.Opened += OnPopupOpened;
            }

            if (_button != null)
            {
                _button.PreviewMouseLeftButtonDown += OnButtonClick;
            }
        }
Ejemplo n.º 2
0
        public override void OnApplyTemplate() {
            base.OnApplyTemplate();

            if (Popup != null) {
                Popup.Opened -= Popup_Opened;
            }

            Popup = GetTemplateChild("PART_Popup") as Popup;
            _panel = GetTemplateChild("PART_Panel") as ColorPickerPanel;
            
            if (Popup != null) {
                Popup.Opened += Popup_Opened;
            }
        }
Ejemplo n.º 3
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (Popup != null)
            {
                Popup.Opened -= Popup_Opened;
            }

            Popup  = GetTemplateChild("PART_Popup") as Popup;
            _panel = GetTemplateChild("PART_Panel") as ColorPickerPanel;

            if (Popup != null)
            {
                Popup.Opened += Popup_Opened;
            }
        }