public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            Body = GetTemplateChild(BodyName) as Grid;

            _slider = GetTemplateChild(SliderName) as SuperSlider;
            //_slider = GetTemplateChild(SliderName) as SuperSliderUpdate;

            _selectedColor = GetTemplateChild(SelectedColorName) as Rectangle;

            if (_slider != null)
            {
                _slider.ApplyTemplate();
                _slider.ValueChanged += Slider_ValueChanged;

                if (Color.A == 0 && Color.R == 0 && Color.G == 0 && Color.B == 0)
                {
                    Color = System.Windows.Media.Color.FromArgb(255, 6, 255, 0);
                }
                else
                {
                    UpdateLayoutBasedOnColor();
                }
            }

            if (Thumb == null)
            {
                Thumb = new ColorSliderThumb();
            }

            SizeChanged += UserControl_SizeChanged;

            IsEnabledVisualStateUpdate();
        }
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            Body = GetTemplateChild(BodyName) as Grid;

            _horizontalSlider = GetTemplateChild(HorizontalSliderName) as SuperSlider;
            _verticalSlider   = GetTemplateChild(VerticalSliderName) as SuperSlider;

            _horizontalSelectedColor = GetTemplateChild(HorizontalSelectedColorName) as Rectangle;
            _verticalSelectedColor   = GetTemplateChild(VerticalSelectedColorName) as Rectangle;

            if (_horizontalSlider != null)
            {
                _horizontalSlider.ApplyTemplate();
            }

            if (_verticalSlider != null)
            {
                _verticalSlider.ApplyTemplate();
            }

            if (Color.A == 0 && Color.R == 0 && Color.G == 0 && Color.B == 0)
            {
                Color = Windows.UI.Color.FromArgb(255, 6, 255, 0);                 // this should be theme accent brush I think.
            }
            else
            {
                UpdateLayoutBasedOnColor();
            }

            if (Thumb == null)
            {
                Thumb = new ColorSliderThumb();
            }

            IsEnabledVisualStateUpdate();
        }