PointerBase Class
Represents a base class for pointers.
public abstract class PointerBase : GaugeElement, ILogicalParent, IVisualParent
- Inheritance:
- object Visual UIElement FrameworkElement GaugeElement object
- Derived:
- CircularPointerBase LinearPointerBase
- Implements:
- ILogicalParent IVisualParent
Constructors
PointerBase()
Initializes an instance of the class.
protected PointerBase()
Properties
Background
The background brush.
BorderBrush
The border brush.
BorderDashStyle
The border dash style.
public DashStyle? BorderDashStyle { get; set; }
Property Value
BorderWidth
The border width.
CanDrag
Indicates whether the pointer can be dragged by the mouse.
public bool CanDrag { get; set; }
Property Value
- bool:
trueif the pointer can be dragged by the mouse,false. The default value isfalse.
DampeningMaximumDuration
The maximum Duration of the dampening effect.
public Duration DampeningMaximumDuration { get; set; }
Property Value
- Duration:
The default value is
750milliseconds.
DampeningMinimumDuration
The minimum Duration of the dampening effect.
public Duration DampeningMinimumDuration { get; set; }
Property Value
- Duration:
The default value is
250milliseconds.
DisplayValue
The value currently displayed.
DragCursor
The Cursor used during drag operations.
HasDropShadow
Indicates whether this instance has a drop shadow.
public bool HasDropShadow { get; set; }
Property Value
- bool:
trueif this instance has a drop shadow; otherwise,false. The default value istrue.
IsDragging
Indicates whether the pointer is currently being dragged by the mouse.
public bool IsDragging { get; }
Property Value
- bool:
trueif the pointer is currently being dragged by the mouse; otherwise,false. The default value isfalse.
IsDraggingAnimated
Indicates whether the pointer is animated when it is being dragged.
public bool IsDraggingAnimated { get; set; }
Property Value
- bool:
trueif the pointer is animated when it is being dragged; otherwise,false. The default value isfalse.
IsLogarithmic
Indicates whether this instance uses a logarithmic scale.
protected bool IsLogarithmic { get; }
Property Value
- bool:
trueif this instance uses a logarithmic scale; otherwise,false.
IsReversed
Indicates whether this instance is reversed.
protected bool IsReversed { get; }
Property Value
- bool:
trueif this instance is reversed; otherwise,false.
IsSnappingEnabled
Indicates whether the Value should be snapped to a specified interval.
public bool IsSnappingEnabled { get; set; }
Property Value
IsValueChangedEventRaised
Indicates whether the ValueChanged should be raised.
public bool IsValueChangedEventRaised { get; set; }
Property Value
- bool:
trueif the ValueChanged should be raised; otherwise,false. The default value istrue.
IsValueChangingEventRaised
Indicates whether the ValueChanging should be raised.
public bool IsValueChangingEventRaised { get; set; }
Property Value
- bool:
trueif the ValueChanging should be raised; otherwise,false. The default value isfalse.
LogarithmicBase
The logarithm base when using a logarithmic scale.
Maximum
The maximum value.
Minimum
The minimum value.
PointerAscent
The ascent of the pointer.
PointerExtent
The extent of the pointer.
RefreshRate
The Duration between value updates.
public Duration RefreshRate { get; set; }
Property Value
- Duration:
The default value is
0.0milliseconds.
ScaleOffset
The offset from the scale based on the ScalePlacement.
ScalePlacement
The placement of the pointer relative to the scale.
public ScalePlacement ScalePlacement { get; set; }
Property Value
- ScalePlacement:
The default value is Overlay.
SnappingInterval
An interval to which the value is snapped when IsSnappingEnabled is true.
SnappingMode
The snapping mode of the pointer when snapping is enabled.
public PointerSnappingMode SnappingMode { get; set; }
Property Value
- PointerSnappingMode:
The default value is Default, which always snaps when snapping is enabled.
ThrottledValue
The throttled Value based on RefreshRate.
Value
The value.
Methods
CalculateValue(Point)
Calculates the value based on a specified point.
protected abstract double CalculateValue(Point point)
| Parameter | Type | Description |
|---|---|---|
| point | Point | The point. |
Returns
CancelDrag()
Cancels a drag operation for the PointerBase.
public void CancelDrag()
Remarks
If a PointerBase is currently dragging, this method removes mouse capture and restores the previous value.
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer? OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnKeyDown(KeyEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The KeyEventArgs that contains the event data. |
OnMouseLeftButtonDown(MouseButtonEventArgs)
Invoked when an unhandled MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseButtonEventArgs | The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed. |
OnMouseLeftButtonUp(MouseButtonEventArgs)
Invoked when an unhandled MouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseButtonEventArgs | The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released. |
OnMouseMove(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnMouseMove(MouseEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The MouseEventArgs that contains the event data. |
OnValueChanged(double, double)
Invoked when the Value property is changed.
protected virtual void OnValueChanged(double oldValue, double newValue)
| Parameter | Type | Description |
|---|---|---|
| oldValue | double | The old property value. |
| newValue | double | The new property value. |
StartDrag(MouseButtonEventArgs)
Starts a thumb drag.
public void StartDrag(MouseButtonEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseButtonEventArgs | The source MouseButtonEventArgs that can be used to capture the pointer. |
UpdateValue(Point)
Updates the value of this pointer based on the specified point.
protected virtual void UpdateValue(Point point)
| Parameter | Type | Description |
|---|---|---|
| point | Point | The point. |
Events
ValueChanged
Occurs when the Value is changed.
public event EventHandler<DoublePropertyChangedRoutedEventArgs> ValueChanged
Event Type
ValueChanging
Occurs before the Value is changed.
public event EventHandler<DoublePropertyChangingRoutedEventArgs> ValueChanging
Event Type
Fields
BackgroundProperty
Defines the Background property.
public static readonly DependencyProperty BackgroundProperty
BorderBrushProperty
Defines the BorderBrush property.
public static readonly DependencyProperty BorderBrushProperty
BorderDashStyleProperty
Defines the BorderDashStyle property.
public static readonly DependencyProperty BorderDashStyleProperty
BorderWidthProperty
Defines the BorderWidth property.
public static readonly DependencyProperty BorderWidthProperty
CanDragProperty
Defines the CanDrag property.
public static readonly DependencyProperty CanDragProperty
DampeningMaximumDurationProperty
Defines the DampeningMaximumDuration property.
public static readonly DependencyProperty DampeningMaximumDurationProperty
DampeningMinimumDurationProperty
Defines the DampeningMinimumDuration property.
public static readonly DependencyProperty DampeningMinimumDurationProperty
DisplayValueProperty
Defines the DisplayValue property.
public static readonly DependencyProperty DisplayValueProperty
DragCursorProperty
Defines the DragCursor property.
public static readonly DependencyProperty DragCursorProperty
HasDropShadowProperty
Defines the HasDropShadow property.
public static readonly DependencyProperty HasDropShadowProperty
IsDraggingAnimatedProperty
Defines the IsDraggingAnimated property.
public static readonly DependencyProperty IsDraggingAnimatedProperty
IsDraggingProperty
Defines the IsDragging property.
public static readonly DependencyProperty IsDraggingProperty
IsSnappingEnabledProperty
Defines the IsSnappingEnabled property.
public static readonly DependencyProperty IsSnappingEnabledProperty
IsValueChangedEventRaisedProperty
Defines the IsValueChangedEventRaised property.
public static readonly DependencyProperty IsValueChangedEventRaisedProperty
IsValueChangingEventRaisedProperty
Defines the IsValueChangingEventRaised property.
public static readonly DependencyProperty IsValueChangingEventRaisedProperty
PointerAscentProperty
Defines the PointerAscent property.
public static readonly DependencyProperty PointerAscentProperty
PointerExtentProperty
Defines the PointerExtent property.
public static readonly DependencyProperty PointerExtentProperty
RefreshRateProperty
Defines the RefreshRate property.
public static readonly DependencyProperty RefreshRateProperty
ScaleOffsetProperty
Defines the ScaleOffset property.
public static readonly DependencyProperty ScaleOffsetProperty
ScalePlacementProperty
Defines the ScalePlacement property.
public static readonly DependencyProperty ScalePlacementProperty
SnappingIntervalProperty
Defines the SnappingInterval property.
public static readonly DependencyProperty SnappingIntervalProperty
SnappingModeProperty
Defines the SnappingMode property.
public static readonly DependencyProperty SnappingModeProperty
ThrottledValueProperty
Defines the ThrottledValue property.
public static readonly DependencyProperty ThrottledValueProperty
ValueChangedEvent
Defines the ValueChanged event.
public static readonly RoutedEvent ValueChangedEvent
ValueChangingEvent
Defines the ValueChanging event.
public static readonly RoutedEvent ValueChangingEvent
ValueProperty
Defines the Value property.
public static readonly DependencyProperty ValueProperty
Inherited Members
- GaugeElement.ZIndexProperty
- GaugeElement.GetVisualChild(int)
- GaugeElement.GetZIndex(UIElement)
- GaugeElement.SetZIndex(UIElement, int)
- GaugeElement.VisualChildren
- GaugeElement.VisualChildrenCount
- GaugeElement.ZIndex