In This Article

ColorComponentSlider Class

Represents a color component slider control.

public class ColorComponentSlider : Slider, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control System.Windows.Controls.Primitives.RangeBase System.Windows.Controls.Slider Object

Remarks

For detailed documentation on this control's features and how to use them, please see the Shared Color Selection documentation topic.

Constructors

ColorComponentSlider()

Initializes an instance of the ColorComponentSlider class.

public ColorComponentSlider()

Properties

ActiveGradientBrush

Gets the active gradient brush to be presented by the slider. This is a dependency property.

public Brush ActiveGradientBrush { get; }

Property Value

System.Windows.Media.Brush:

The active gradient brush to be presented by the slider. The default value is null.

Component

Gets or sets the color component that is modified by the slider. This is a dependency property.

public ColorComponent Component { get; set; }

Property Value

ColorComponent:

The color component that is modified by the slider. The default value is ColorComponent.Alpha

DisabledOpacity

Gets or sets the opacity used when the control is disabled. This is a dependency property.

public double DisabledOpacity { get; set; }

Property Value

System.Double:

The opacity used when the control is disabled. The default value is 1.0.

SelectedColor

Gets or sets the System.Windows.Media.Color that is selected in the slider. This is a dependency property.

public Color SelectedColor { get; set; }

Property Value

System.Windows.Media.Color:

The System.Windows.Media.Color that is selected in the slider. 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 System.Windows.Media.Color

The old value.

newValue System.Windows.Media.Color

The new value.

OnValueChanged(Double, Double)

Occurs when the value of the slider changes.

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

The old value.

newValue System.Double

The new value.

Events

SelectedColorChanged

Occurs when the value of the SelectedColor property is changed.

public event RoutedPropertyChangedEventHandler<Color> SelectedColorChanged

Event Type

System.Windows.RoutedPropertyChangedEventHandler<System.Windows.Media.Color>

Fields

ActiveGradientBrushProperty

Identifies the read-only ActiveGradientBrush dependency property. This field is read-only.

public static readonly DependencyProperty ActiveGradientBrushProperty

ComponentProperty

Identifies the Component dependency property. This field is read-only.

public static readonly DependencyProperty ComponentProperty

DisabledOpacityProperty

Identifies the DisabledOpacity dependency property. This field is read-only.

public static readonly DependencyProperty DisabledOpacityProperty

SelectedColorChangedEvent

Identifies the SelectedColorChanged routed event. This field is read-only.

public static readonly RoutedEvent SelectedColorChangedEvent

SelectedColorProperty

Identifies the SelectedColor dependency property. This field is read-only.

public static readonly DependencyProperty SelectedColorProperty

Inherited Members

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()

Extension Methods