In This Article

SpectrumSlider Class

Represents a hue spectrum slider control.

public class SpectrumSlider : 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

SpectrumSlider()

Initializes an instance of the SpectrumSlider class.

public SpectrumSlider()

Properties

SelectedColor

Gets or sets the System.Windows.Media.Color that is selected in the slider.

public Color SelectedColor { get; set; }

Property Value

System.Windows.Media.Color:

The System.Windows.Media.Color that is selected in the slider.

Methods

OnMouseLeftButtonUp(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonUp attached event is raised on this element. Implement this method to add class handling for this event.

protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameter Type Description
e System.Windows.Input.MouseButtonEventArgs

A System.Windows.Input.MouseButtonEventArgs that contains the event data.

OnMouseMove(MouseEventArgs)

Invoked when an unhandled System.Windows.UIElement.MouseMove attached event is raised on this element. Implement this method to add class handling for this event.

protected override void OnMouseMove(MouseEventArgs e)
Parameter Type Description
e System.Windows.Input.MouseEventArgs

A System.Windows.Input.MouseEventArgs that contains the event data.

OnMouseWheel(MouseWheelEventArgs)

Invoked when an unhandled System.Windows.UIElement.MouseWheel attached event is raised on this element. Implement this method to add class handling for this event.

protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameter Type Description
e System.Windows.Input.MouseWheelEventArgs

A System.Windows.Input.MouseWheelEventArgs that contains the event data.

OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.UIElement.PreviewMouseLeftButtonDown attached event is raised on this element. Implement this method to add class handling for this event.

protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
Parameter Type Description
e System.Windows.Input.MouseButtonEventArgs

A System.Windows.Input.MouseButtonEventArgs that contains the event data.

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

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