WinUI

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RangePointer

    Show / Hide Table of Contents

    Class RangePointer

    Create the pointer to indicate the value with rounded range bar arc. A RangePointer is used to indicate the current value relative to the start value of a axis scale.

    Inheritance
    System.Object
    GaugePointer
    RangePointer
    Inherited Members
    GaugePointer.ValueProperty
    GaugePointer.EnableAnimationProperty
    GaugePointer.AnimationDurationProperty
    GaugePointer.IsInteractiveProperty
    GaugePointer.AnimationEasingFunctionProperty
    GaugePointer.OnPointerReleased(PointerRoutedEventArgs)
    GaugePointer.Value
    GaugePointer.EnableAnimation
    GaugePointer.AnimationDuration
    GaugePointer.IsInteractive
    GaugePointer.AnimationEasingFunction
    GaugePointer.ValueChangeStarted
    GaugePointer.ValueChanging
    GaugePointer.ValueChanged
    GaugePointer.ValueChangeCompleted
    Namespace: Syncfusion.UI.Xaml.Gauges
    Assembly: Syncfusion.Gauge.WinUI.dll
    Syntax
    public class RangePointer : GaugePointer
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:RangePointer Value="50" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Constructors

    RangePointer()

    Initializes a new instance of the RangePointer class.

    Declaration
    public RangePointer()
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:RangePointer Value="50" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Fields

    CornerStyleProperty

    Identifies the CornerStyle dependency property.

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

    The identifier for CornerStyle dependency property.

    GradientStopsProperty

    Identifies the GradientStops dependency property.

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

    The identifier for GradientStops dependency property.

    OffsetUnitProperty

    Identifies the OffsetUnit dependency property.

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

    The identifier for OffsetUnit dependency property.

    PointerOffsetProperty

    Identifies the PointerOffset dependency property.

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

    The identifier for PointerOffset dependency property.

    PointerWidthProperty

    Identifies the PointerWidth dependency property.

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

    The identifier for PointerWidth dependency property.

    WidthUnitProperty

    Identifies the WidthUnit dependency property.

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

    The identifier for WidthUnit dependency property.

    Properties

    CornerStyle

    Gets or sets the value that specifies the corner style of range pointer.

    Declaration
    public CornerStyle CornerStyle { get; set; }
    Property Value
    Type Description
    CornerStyle

    One of the enumeration values that specifies the corner style of range pointer in the radial gauge. The default is BothFlat.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:RangePointer Value="50" 
                                        PointerWidth="0.2"
                                        WidthUnit="Factor"
                                        PointerOffset="0.2"
                                        OffsetUnit="Factor"
                                        CornerStyle="BothCurve" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    GradientStops

    Gets or sets a collection of GaugeGradientStop to fill the gradient brush to the range pointer.

    Declaration
    public ObservableCollection<GaugeGradientStop> GradientStops { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<GaugeGradientStop>

    A collection of the GaugeGradientStop objects associated with the brush, each of which specifies a color and an offset along the axis. The default is an empty collection.

    Examples

    The below examples shows, how to add a collection of gradient stop to the range pointer.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:RangePointer Value="80"
                                        PointerWidth="0.2"
                                        WidthUnit="Factor"
                                        PointerOffset="0.2"
                                        OffsetUnit="Factor">
                        <gauge:RangePointer.GradientStops>
                            <gauge:GaugeGradientStop Value="0"
                                                     Color="Green" />
                            <gauge:GaugeGradientStop Value="50"
                                                     Color="Yellow" />
                            <gauge:GaugeGradientStop Value="80"
                                                     Color="Red" />
                        </gauge:RangePointer.GradientStops>
                    </gauge:RangePointer>
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    OffsetUnit

    Gets or sets the value that indicates the to calculate the range pointer offset either in logical pixel or factor.

    Declaration
    public SizeUnit OffsetUnit { get; set; }
    Property Value
    Type Description
    SizeUnit

    One of the SizeUnit enumeration that specifies how the PointerOffset value is considered. The default mode is Pixel.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:RangePointer Value="50" 
                                        PointerWidth="0.2"
                                        WidthUnit="Factor"
                                        PointerOffset="0.2"
                                        OffsetUnit="Factor" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    PointerOffset

    Gets or sets the value that specifies the position value for pointer. You can specify value either in logical pixel or radius factor using the OffsetUnit property.

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

    It defines the position offset of the pointer either pixel or factor. The default value is double.NaN.

    Examples

    If OffsetUnit is Factor, value will be given from 0 to 1. Here pointer placing position is calculated by PointerOffset * axis radius value. Example: PointerOffset value is 0.2 and axis radius is 100, pointer is moving 20(0.2 * 100) logical pixels from axis outer radius. If OffsetUnit is Pixel, defined value distance pointer will move from the outer radius axis. When you specify PointerOffset is negative, the pointer will be positioned outside the axis.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:RangePointer Value="50" 
                                        PointerWidth="0.2"
                                        WidthUnit="Factor"
                                        PointerOffset="0.2" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    PointerWidth

    Gets or sets the value that specifies the pointer width. You can specify value either in logical pixel or radius factor using the WidthUnit property.

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

    It defines the width of the pointer. The default value is 10.

    Examples

    If WidthUnit is Factor, value will be given from 0 to 1. Here length size is calculated by PointerWidth * axis radius value. Example: PointerWidth value is 0.2 and axis radius is 100, length size is 20(0.2 * 100) logical pixels. if WidthUnit is Pixel, defined value is set to the length size.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:RangePointer Value="50" 
                                        PointerWidth="0.2" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    WidthUnit

    Gets or sets the value that indicates to calculate the range pointer width either in logical pixel or radius factor.

    Declaration
    public SizeUnit WidthUnit { get; set; }
    Property Value
    Type Description
    SizeUnit

    One of the SizeUnit enumeration that specifies how the PointerWidth value is considered. The default mode is Pixel.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:RangePointer Value="50" 
                                        PointerWidth="0.2"
                                        WidthUnit="Factor" />
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Methods

    OnApplyTemplate()

    Invoke to render RangePointer class.

    Declaration
    protected override void OnApplyTemplate()

    OnCreateAutomationPeer()

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

    OnPointerPressed(PointerRoutedEventArgs)

    Called when the pointer get pressed.

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

    The pointer routed event arguments.

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved