In This Article

ColorComponentSlider Class

Represents a color component slider control.

public class ColorComponentSlider : Slider, IOrientedElement
Inheritance:
object Visual UIElement FrameworkElement Control RangeBase Slider object
Implements:
IOrientedElement

Constructors

ColorComponentSlider()

Initializes an instance of the class.

public ColorComponentSlider()

Properties

ActiveGradientBrush

The active gradient brush to be presented by the slider.

public Brush? ActiveGradientBrush { get; }

Property Value

Brush:

The default value is null.

Component

The color component that is modified by the slider.

public ColorComponent Component { get; set; }

Property Value

ColorComponent:

The default value is Alpha.

DisabledOpacity

The opacity used when the control is disabled.

public double DisabledOpacity { get; set; }

Property Value

double:

The default value is 1.0.

SelectedColor

The Color that is selected in the slider.

public Color SelectedColor { get; set; }

Property Value

Color:

The default value is Colors.Red.

Methods

OnSelectedColorChanged(Color, Color)

Raises the SelectedColorChanged event.

protected virtual void OnSelectedColorChanged(Color oldValue, Color newValue)
Parameter Type Description
oldValue Color

The old value.

newValue Color

The new value.

OnValueChanged(double, double)

Updates the current position of the Slider when the Value property changes.

protected override void OnValueChanged(double oldValue, double newValue)
Parameter Type Description
oldValue double

The old Value of the Slider.

newValue double

The new Value of the Slider.

Events

SelectedColorChanged

Occurs when the value of the SelectedColor property is changed.

public event RoutedPropertyChangedEventHandler<Color> SelectedColorChanged

Event Type

RoutedPropertyChangedEventHandler<Color>

Fields

ActiveGradientBrushProperty

Defines the ActiveGradientBrush property.

public static readonly DependencyProperty ActiveGradientBrushProperty

ComponentProperty

Defines the Component property.

public static readonly DependencyProperty ComponentProperty

DisabledOpacityProperty

Defines the DisabledOpacity property.

public static readonly DependencyProperty DisabledOpacityProperty

SelectedColorChangedEvent

Defines the SelectedColorChanged event.

public static readonly RoutedEvent SelectedColorChangedEvent

SelectedColorProperty

Defines the SelectedColor property.

public static readonly DependencyProperty SelectedColorProperty

Extension Methods