protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
        {
            base.OnApplyTemplate(e);

            Items             = HexComboBoxHelpers.GetNamedColors();
            SelectionChanged += Hex_SelectionChanged;

            var copyButton = e.NameScope.Find <Button>("PART_CopyButton");

            copyButton.Click += CopyButtonOnClick;


            SetSelectedItemInHex(_manager.CurrentColor);
        }
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            ItemsSource       = HexComboBoxHelpers.GetNamedColors();
            SelectionChanged += Hex_SelectionChanged;

            var copyButton = GetTemplateChild("PART_CopyButton") as Button;

            copyButton.Click += CopyButtonOnClick;


            _textChangedEventHandler = HexTextBox_OnTextChanged;
            AddHandler(TextBoxBase.TextChangedEvent, _textChangedEventHandler);

            SetSelectedItemInHex(_manager.CurrentColor);
        }