RadialSlider Class
Represents a radial slider.
[TemplatePart(Name = "PART_Thumb", Type = typeof(CircularThumb))]
public class RadialSlider : RangeBase
- Derived:
- EmbeddedRadialSlider
Constructors
RadialSlider()
Initializes an instance of the RadialSlider
class.
public RadialSlider()
Properties
IntermediateValue
Gets or sets the value of the slider while the user is interacting with it, before the value is snapped.
Radius
Gets or sets the slider's radius.
public double Radius { get; set; }
Property Value
- double:
The slider's radius. The default value is
100.0
.
ThumbArrowAngle
Gets or sets the thumb's arrow angle.
public double ThumbArrowAngle { get; set; }
Property Value
- double:
The thumb's arrow angle. The default value is
180.0
, meaning it will face down when up at0
degrees in the slider.
ThumbBackground
Gets or sets the background Brush to render when the thumb is in a normal state.
public Brush ThumbBackground { get; set; }
Property Value
ThumbPressedBackground
Gets or sets the background Brush to render when the thumb is pressed.
public Brush ThumbPressedBackground { get; set; }
Property Value
ThumbStyle
Gets or sets the Style to use for the thumb.
public Style ThumbStyle { get; set; }
Property Value
Remarks
Use this property if a custom thumb Style is desired.
Methods
OnApplyTemplate()
Invoked whenever application code or internal processes call ApplyTemplate
.
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns an AutomationPeer object for this control instance.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
An AutomationPeer instance.
OnValueChanged(double, double)
Occurs when the Value
property has changed.
protected override void OnValueChanged(double oldValue, double newValue)
Parameter | Type | Description |
---|---|---|
oldValue | double | The old value. |
newValue | double | The new value. |
SetValueCore(double)
Sets the Value
property and applies snapping.
protected void SetValueCore(double value)
Parameter | Type | Description |
---|---|---|
value | double | The value to set. |
StartDrag(InputPointerButtonEventArgs)
Starts a thumb drag.
public void StartDrag(InputPointerButtonEventArgs sourceEventArgs)
Parameter | Type | Description |
---|---|---|
sourceEventArgs | InputPointerButtonEventArgs | The source InputPointerButtonEventArgs, which can be used to capture the pointer. |
Fields
IntermediateValueProperty
Identifies the IntermediateValue dependency property. This field is read-only.
public static readonly DependencyProperty IntermediateValueProperty
RadiusProperty
Identifies the Radius dependency property. This field is read-only.
public static readonly DependencyProperty RadiusProperty
ThumbArrowAngleProperty
Identifies the ThumbArrowAngle dependency property. This field is read-only.
public static readonly DependencyProperty ThumbArrowAngleProperty
ThumbBackgroundProperty
Identifies the ThumbBackground dependency property. This field is read-only.
public static readonly DependencyProperty ThumbBackgroundProperty
ThumbPressedBackgroundProperty
Identifies the ThumbPressedBackground dependency property. This field is read-only.
public static readonly DependencyProperty ThumbPressedBackgroundProperty
ThumbStyleProperty
Identifies the ThumbStyle dependency property. This field is read-only.
public static readonly DependencyProperty ThumbStyleProperty