CircularThumb Class
Represents a circular thumb used to change values in a various input control.
[TemplatePart(Name = "PART_Arrow", Type = typeof(UIElement))]
[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualState(Name = "PointerOver", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Pressed", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Focused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "PointerFocused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "Unfocused", GroupName = "FocusStates")]
public class CircularThumb : Control
- Inheritance:
- object Visual UIElement FrameworkElement Control object
Constructors
CircularThumb()
Initializes an instance of the CircularThumb
class.
public CircularThumb()
Properties
ArrowAngle
Gets or sets the arrow angle.
public double ArrowAngle { get; set; }
Property Value
- double:
The arrow angle. The default value is
180.0
.
IsDragging
Gets whether the thumb is being dragged by a pointer.
public bool IsDragging { get; }
Property Value
- bool:
true
if the thumb is being dragged by a pointer; otherwise,false
.
PressedBackground
Gets or sets the background Brush to render when the thumb is pressed.
public Brush PressedBackground { get; set; }
Property Value
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.
OnGotFocus(RoutedEventArgs)
Occurs when the control gains focus.
protected override void OnGotFocus(RoutedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | RoutedEventArgs | The RoutedEventArgs that contains the event data. |
OnLostFocus(RoutedEventArgs)
Occurs when the control loses focus.
protected override void OnLostFocus(RoutedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | RoutedEventArgs | The RoutedEventArgs that contains the event data. |
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
ArrowAngleProperty
Identifies the ArrowAngle dependency property. This field is read-only.
public static readonly DependencyProperty ArrowAngleProperty
IsDraggingProperty
Identifies the IsDragging dependency property. This field is read-only.
public static readonly DependencyProperty IsDraggingProperty
PressedBackgroundProperty
Identifies the PressedBackground dependency property. This field is read-only.
public static readonly DependencyProperty PressedBackgroundProperty