menu

Class LinearGaugePointer - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class LinearGaugePointer

    Base class for all linear gauge pointers. It holds the common properties and logics for customizing gauge pointers.

    Inheritance
    System.Object
    LinearGaugePointer
    BarPointer
    LinearMarkerPointer
    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 1500 milliseconds.

    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 null.

    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 0.

    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>
    Examples
    • XAML
    • C#
    <gauge:SfLinearGauge>
        <gauge:SfLinearGauge.Axis>
            <gauge:LinearAxis>
                <gauge:LinearAxis.MarkerPointers>
                    <gauge:LinearShapePointer ValueChanged="ShapePointer_ValueChanged" />
                </gauge:LinearAxis.MarkerPointers>
            </gauge:LinearAxis>
        </gauge:SfLinearGauge.Axis>
    </gauge:SfLinearGauge>
    private void ShapePointer_ValueChanged(object sender, ValueChangedEventArgs e)
    {
       var value = e.Value;
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved