menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GaugePointer - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GaugePointer

    Base class of GaugePointer that properties for customizing gauge pointers.

    Inheritance
    System.Object
    GaugePointer
    MarkerPointer
    NeedlePointer
    RangePointer
    Namespace: Syncfusion.UI.Xaml.Gauges
    Assembly: Syncfusion.Gauge.WinUI.dll
    Syntax
    public abstract class GaugePointer : Control

    Constructors

    GaugePointer()

    Declaration
    protected GaugePointer()

    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.

    IsInteractiveProperty

    Identifies the IsInteractive dependency property.

    Declaration
    public static readonly DependencyProperty IsInteractiveProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    The identifier for IsInteractive 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 1500 milliseconds.

    Remarks

    It specifies how long the pointer animation will take to reach from old value to new value.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:ShapePointer AnimationDuration="1500" />
                    <gauge:NeedlePointer AnimationDuration="1500" />
                    <gauge:RangePointer AnimationDuration="1500" />
                </ gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    AnimationEasingFunction

    Gets or sets easing function to apply for pointer animation when the value changes.

    Declaration
    public EasingFunctionBase AnimationEasingFunction { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Media.Animation.EasingFunctionBase

    Its default value is null.

    Remarks

    A custom animation easing function can be defined as required, when any of the build-in double animation is not sufficient.

    Examples

    Specifies the different Microsoft.UI.Xaml.Media.Animation.EasingFunctionBase for pointer. Different type of animation provides visually appealing way when the pointer moves from one value to another. Defaults to null.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:NeedlePointer EnableAnimation="True">
                        <gauge:NeedlePointer.AnimationEasingFunction>
                            <BackEase EasingMode="EaseIn" />
                        </gauge:NeedlePointer.AnimationEasingFunction>
                    </gauge:NeedlePointer>
                </ gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    EnableAnimation

    Gets or sets a value indicating whether 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:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:ShapePointer EnableAnimation="True" />
                    <gauge:NeedlePointer EnableAnimation="True" />
                    <gauge:RangePointer EnableAnimation="True" />
                </ gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    IsInteractive

    Gets or sets a value indicating whether the control accepts changing its Value through interaction.

    Declaration
    public bool IsInteractive { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if pointer interaction is enabled; otherwise, false.The default value is false.

    Remarks

    It decides whether the gauge pointer will be interactive or not. If IsInteractive is true, the gauge pointer will be interactive, otherwise not.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:ShapePointer IsInteractive="True" />
                    <gauge:NeedlePointer IsInteractive="True" />
                    <gauge:RangePointer IsInteractive="True" />
                </ gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Value

    Gets or sets the value that specifies the value of the pointer.

    Declaration
    public double Value { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:ShapePointer Value="50" />
                    <gauge:NeedlePointer Value="30" />
                    <gauge:RangePointer Value="80" />
                </ gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Methods

    OnCreateAutomationPeer()

    Declaration
    protected override AutomationPeer OnCreateAutomationPeer()
    Returns
    Type
    Microsoft.UI.Xaml.Automation.Peers.AutomationPeer

    OnPointerReleased(PointerRoutedEventArgs)

    Called when the pointer get released.

    Declaration
    protected override void OnPointerReleased(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e

    The pointer routed event arguments.

    Events

    ValueChangeCompleted

    Called when the user is done selecting a new value of the pointer by dragging.

    Declaration
    public event EventHandler<ValueChangedEventArgs> ValueChangeCompleted
    Event Type
    Type
    System.EventHandler<ValueChangedEventArgs>
    Examples
    • XAML
    • C#
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:ShapePointer ValueChangeCompleted="ShapePointer_ValueChangeCompleted" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>
    private void ShapePointer_ValueChangeCompleted(object sender, ValueChangedEventArgs e)
    {
       var value = e.Value;
    }

    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>
    Examples
    • XAML
    • C#
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:ShapePointer ValueChanged="ShapePointer_ValueChanged" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>
    using Syncfusion.UI.Xaml.Gauges;
    ...
    private void ShapePointer_ValueChanged(object sender, ValueChangedEventArgs e)
    {
       var value = e.Value;
    }

    ValueChangeStarted

    Called when the user starts selecting a new value of pointer by dragging.

    Declaration
    public event EventHandler<ValueChangedEventArgs> ValueChangeStarted
    Event Type
    Type
    System.EventHandler<ValueChangedEventArgs>
    Examples
    • XAML
    • C#
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:ShapePointer ValueChangeStarted = "ShapePointer_ValueChangeStarted" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>
    private void ShapePointer_ValueChangeStarted(object sender, ValueChangedEventArgs e)
    {
       var value = e.Value;
    }

    ValueChanging

    Called before when the user is selecting a new value for the pointers by dragging.

    Declaration
    public event EventHandler<ValueChangingEventArgs> ValueChanging
    Event Type
    Type
    System.EventHandler<ValueChangingEventArgs>
    Examples
    • XAML
    • C#
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:ShapePointer ValueChanging="ShapePointer_ValueChanging" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>
    private void ShapePointer_ValueChanging(object sender, ValueChangingEventArgs e)
    {
       var oldValue = e.OldValue;
       var newValue = e.NewValue;
       var cancel = e.Cancel;
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved