示例#1
0
        private void IsEnabledVisualStateUpdate()
        {
            VisualStateManager.GoToState(this, IsEnabled ? "Normal" : "Disabled", true);

            var colorBrush = IsEnabled ? ColorSpace.GetColorGradientBrush(Orientation) : ColorSpace.GetBlackAndWhiteGradientBrush(Orientation);

            if (_horizontalSlider != null)
            {
                _horizontalSlider.Background = colorBrush;
            }

            if (_verticalSlider != null)
            {
                _verticalSlider.Background = colorBrush;
            }
        }
 private void IsEnabledVisualStateUpdate()
 {
     VisualStateManager.GoToState(this, IsEnabled ? "Normal" : "Disabled", true);
     _slider.Background = IsEnabled ? ColorSpace.GetColorGradientBrush(Orientation) : ColorSpace.GetBlackAndWhiteGradientBrush(Orientation);
 }