Class LinearGaugePointer
Base class for all linear gauge pointers. It holds the common properties and logics for customizing gauge pointers.
Namespace: Syncfusion.UI.Xaml.Gauges
Assembly: Syncfusion.Gauge.WinUI.dll
Syntax
public abstract class LinearGaugePointer : Control
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis Interval="10">
<gauge:LinearAxis.BarPointers>
<gauge:BarPointer Value="90" />
</gauge:LinearAxis.BarPointers>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="90"
VerticalAnchor="End"
OffsetPoint="0,-3" />
<gauge:LinearContentPointer Value="90"
VerticalAnchor="End"
OffsetPoint="0,-23">
<gauge:LinearContentPointer.Content>
<TextBlock Text="90%" />
</gauge:LinearContentPointer.Content>
</gauge:LinearContentPointer>
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
Constructors
LinearGaugePointer()
Declaration
protected LinearGaugePointer()
Fields
AnimationDurationProperty
Identifies the AnimationDuration dependency property.
Declaration
public static readonly DependencyProperty AnimationDurationProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for AnimationDuration dependency property. |
AnimationEasingFunctionProperty
Identifies the AnimationEasingFunction dependency property.
Declaration
public static readonly DependencyProperty AnimationEasingFunctionProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for AnimationEasingFunction dependency property. |
EnableAnimationProperty
Identifies the EnableAnimation dependency property.
Declaration
public static readonly DependencyProperty EnableAnimationProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for EnableAnimation dependency property. |
ValueProperty
Identifies the Value dependency property.
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for Value dependency property. |
Properties
AnimationDuration
Gets or sets a value that specifies the pointer animation duration in milliseconds.
Declaration
public double AnimationDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is |
Remarks
It specifies how long the pointer animation will take to reach from old value to new value.
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis Interval="10"
MinorTicksPerInterval="4">
<gauge:LinearAxis.BarPointers>
<gauge:BarPointer Value="60"
EnableAnimation="True"
AnimationDuration="3000" />
</gauge:LinearAxis.BarPointers>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
VerticalAnchor="End"
OffsetPoint="0,-3"
EnableAnimation="True"
AnimationDuration="3000" />
<gauge:LinearContentPointer Value="60"
VerticalAnchor="End"
OffsetPoint="0,-23"
EnableAnimation="True"
AnimationDuration="3000">
<gauge:LinearContentPointer.Content>
<TextBlock Text="60%" />
</gauge:LinearContentPointer.Content>
</gauge:LinearContentPointer>
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
AnimationEasingFunction
Gets or sets the value that specifies the different easing function for pointer.
Declaration
public EasingFunctionBase AnimationEasingFunction { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Animation.EasingFunctionBase | Its default value is |
Remarks
A custom animation easing function can be defined as required, when any of the build-in double animation is not sufficient.
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis Interval="10"
MinorTicksPerInterval="4">
<gauge:LinearAxis.BarPointers>
<gauge:BarPointer Value="70"
EnableAnimation="True"
AnimationDuration="3000">
<gauge:BarPointer.AnimationEasingFunction>
<CircleEase EasingMode="EaseIn" />
</gauge:BarPointer.AnimationEasingFunction>
</gauge:BarPointer>
</gauge:LinearAxis.BarPointers>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="70"
VerticalAnchor="End"
OffsetPoint="0,-3"
EnableAnimation="True"
AnimationDuration="3000">
<gauge:LinearShapePointer.AnimationEasingFunction>
<CircleEase EasingMode="EaseIn" />
</gauge:LinearShapePointer.AnimationEasingFunction>
</gauge:LinearShapePointer>
<gauge:LinearContentPointer Value="70"
VerticalAnchor="End"
OffsetPoint="0,-23"
EnableAnimation="True"
AnimationDuration="3000">
<gauge:LinearContentPointer.AnimationEasingFunction>
<CircleEase EasingMode="EaseIn" />
</gauge:LinearContentPointer.AnimationEasingFunction>
<gauge:LinearContentPointer.Content>
<TextBlock Text="70%" />
</gauge:LinearContentPointer.Content>
</gauge:LinearContentPointer>
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
EnableAnimation
Gets or sets a value that indicates whether to enables or disables the pointer animation.
Declaration
public bool EnableAnimation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if animation is enabled; otherwise, false.The default value is false. |
Remarks
EnableAnimation
decides whether the pointer will be animated or not while its value get changed.
If EnableAnimation
is true
, then it will be animated, otherwise not.
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis Interval="10"
MinorTicksPerInterval="4">
<gauge:LinearAxis.BarPointers>
<gauge:BarPointer Value="60"
EnableAnimation="True" />
</gauge:LinearAxis.BarPointers>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
VerticalAnchor="End"
OffsetPoint="0,-3"
EnableAnimation="True" />
<gauge:LinearContentPointer Value="60"
VerticalAnchor="End"
OffsetPoint="0,-23"
EnableAnimation="True">
<gauge:LinearContentPointer.Content>
<TextBlock Text="60%" />
</gauge:LinearContentPointer.Content>
</gauge:LinearContentPointer>
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
Value
Gets or sets the current the value of the pointer.
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis Interval="10">
<gauge:LinearAxis.BarPointers>
<gauge:BarPointer Value="90" />
</gauge:LinearAxis.BarPointers>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="90"
VerticalAnchor="End"
OffsetPoint="0,-3" />
<gauge:LinearContentPointer Value="90"
VerticalAnchor="End"
OffsetPoint="0,-23">
<gauge:LinearContentPointer.Content>
<TextBlock Text="90%" />
</gauge:LinearContentPointer.Content>
</gauge:LinearContentPointer>
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
Events
ValueChanged
Called when the user is selecting a new value for the pointers by dragging.
Declaration
public event EventHandler<ValueChangedEventArgs> ValueChanged
Event Type
Type |
---|
System.EventHandler<ValueChangedEventArgs> |