RadialSlider Class
Represents a radial slider.
[TemplatePart(Name = "PART_Thumb", Type = typeof(CircularThumb))]
public class RadialSlider : RangeBase, 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 Object
- 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.
public double IntermediateValue { get; set; }
Property Value
- System.Double:
A temporary value.
Radius
Gets or sets the slider's radius.
public double Radius { get; set; }
Property Value
- System.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
- System.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 System.Windows.Media.Brush to render when the thumb is in a normal state.
public Brush ThumbBackground { get; set; }
Property Value
- System.Windows.Media.Brush:
The background System.Windows.Media.Brush to render when the thumb is in a normal state.
ThumbPressedBackground
Gets or sets the background System.Windows.Media.Brush to render when the thumb is pressed.
public Brush ThumbPressedBackground { get; set; }
Property Value
- System.Windows.Media.Brush:
The background System.Windows.Media.Brush to render when the thumb is pressed.
ThumbStyle
Gets or sets the System.Windows.Style to use for the thumb.
public Style ThumbStyle { get; set; }
Property Value
- System.Windows.Style:
The System.Windows.Style to use for the thumb.
Remarks
Use this property if a custom thumb System.Windows.Style is desired.
Methods
OnApplyTemplate()
Invoked whenever application code or internal processes call ApplyTemplate
.
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns an System.Windows.Automation.Peers.AutomationPeer object for this control instance.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- System.Windows.Automation.Peers.AutomationPeer:
An System.Windows.Automation.Peers.AutomationPeer instance.
OnValueChanged(Double, Double)
Occurs when the Value
property has changed.
protected override void OnValueChanged(double oldValue, double newValue)
Parameter | Type | Description |
---|---|---|
oldValue | System.Double | The old value. |
newValue | System.Double | The new value. |
SetValueCore(Double)
Sets the Value
property and applies snapping.
protected void SetValueCore(double value)
Parameter | Type | Description |
---|---|---|
value | System.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
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
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()