menu

WPF

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

    Show / Hide Table of Contents

    Class LinearPointer

    Represents the abstract base class for LinearBarPointer and LinearMarkerPointer

    Inheritance
    System.Object
    GaugeElement
    LinearPointer
    LinearBarPointer
    LinearMarkerPointer
    Inherited Members
    GaugeElement.BackgroundBrush
    GaugeElement.BackgroundBrushProperty
    GaugeElement.BorderBrush
    GaugeElement.BorderBrushProperty
    GaugeElement.BorderWidth
    GaugeElement.BorderWidthProperty
    Namespace: Syncfusion.Windows.Gauge
    Assembly: Syncfusion.Gauge.WPF.dll
    Syntax
    public abstract class LinearPointer : GaugeElement
    Examples
    
    
    
    
    
    
    
    
    
    
    
    
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Media;
    using System.Windows.Controls;
    using System.Windows.Data;
    using Syncfusion.Windows.Shared;
    using Syncfusion.Windows.Gauge;

    namespace LinearPointerSample

    { public partial class Window1 : Window { private LinearGauge linearGauge1;

    public Window1() { InitializeComponent();

    linearGauge1 = new LinearGauge(); this.linearGauge1.CenterFrameFillColor = Colors.Brown;

    LinearScale scale = new LinearScale(); scale.Minimum = 0; scale.Maximum = 100; scale.MinorIntervalValue = 2; scale.MajorIntervalValue = 10; scale.ScaleBarSize = 20; scale.ScaleBarLength = 260; linearGauge1.Scales.Add(scale);

    LinearBarPointer pointer = new LinearBarPointer(); pointer.BackgroundBrush = Brushes.Red; pointer.BorderBrush = new SolidColorBrush(Colors.Red); pointer.PointerWidth = 8; pointer.Value = 45; scale.Pointers.Add(pointer);

    this.Content = linearGauge1; } } }

    Constructors

    LinearPointer()

    Initializes a new instance of the LinearPointer class.

    Declaration
    public LinearPointer()

    Fields

    AnimationDurationProperty

    Identifies the AnimationDuration dependency property.

    Declaration
    public static readonly DependencyProperty AnimationDurationProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DecrementKeyProperty

    Identifies the DecrementKey dependency property.

    Declaration
    public static readonly DependencyProperty DecrementKeyProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    EnablePointerInteractionProperty

    Identifies the EnablePointerInteraction dependency property.

    Declaration
    public static readonly DependencyProperty EnablePointerInteractionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    IncrementKeyProperty

    Identifies the IncrementKey dependency property.

    Declaration
    public static readonly DependencyProperty IncrementKeyProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    PointerWidthProperty

    Identifies the PointerWidth dependency property.

    Declaration
    public static readonly DependencyProperty PointerWidthProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ValueProperty

    Identifies the Value dependency property.

    Declaration
    public static readonly DependencyProperty ValueProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    AnimationDuration

    Gets or sets the animation duration of the pointer. This is a dependency property.

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

    Type: System.Double Default value is Double.NaN.

    DecrementKey

    Gets or sets the Decrement key for the pointer. This is a dependency property.

    Declaration
    public Key DecrementKey { get; set; }
    Property Value
    Type Description
    System.Windows.Input.Key

    Type: System.Windows.Input.Key Default value is Down key.

    EnablePointerInteraction

    Gets or sets whether the pointer interactivity of the pointer is enabled or not. This is a dependency property.

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

    Type: System.Boolean Default value is true.

    IncrementKey

    Gets or sets the Increment key for the pointer. This is a dependency property.

    Declaration
    public Key IncrementKey { get; set; }
    Property Value
    Type Description
    System.Windows.Input.Key

    Type: System.Windows.Input.Key Default value is Up key.

    PointerWidth

    Gets or sets the width of the pointer. This is a dependency property.

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

    Type: System.Double Default value is 0.

    See Also
    PointerLength

    Value

    Gets or sets the value to be indicated by the pointer.

    This is a dependency property.

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

    Type: System.Double Default value is 0.

    Methods

    CoercePosition(Object)

    Fulfils the logic before setting the value of Syncfusion.Windows.Gauge.LinearPointer.Position dependency property.

    Declaration
    protected virtual object CoercePosition(object value)
    Parameters
    Type Name Description
    System.Object value

    The value that should be corrected.

    Returns
    Type Description
    System.Object

    The corrected value.

    CoercePosition(DependencyObject, Object)

    Coerces the value of the Syncfusion.Windows.Gauge.LinearPointer.Position property.

    Declaration
    public static object CoercePosition(DependencyObject d, object value)
    Parameters
    Type Name Description
    System.Windows.DependencyObject d

    The LinearPointer object.

    System.Object value

    The instance containing the event data.

    Returns
    Type Description
    System.Object

    The checked value.

    CoerceValue(Object)

    Fulfils the logic before setting the value of Value dependency property.

    Declaration
    protected virtual object CoerceValue(object value)
    Parameters
    Type Name Description
    System.Object value

    The value that should be corrected.

    Returns
    Type Description
    System.Object

    The corrected value.

    CoerceValue(DependencyObject, Object)

    Coerces the value of the Value property.

    Declaration
    public static object CoerceValue(DependencyObject d, object value)
    Parameters
    Type Name Description
    System.Windows.DependencyObject d

    The LinearPointer object.

    System.Object value

    The instance containing the event data.

    Returns
    Type Description
    System.Object

    The checked value.

    OnAnimationDurationChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises AnimationDurationChanged event.

    Declaration
    protected virtual void OnAnimationDurationChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnDecrementKeyChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises DecrementKeyChanged event.

    Declaration
    protected virtual void OnDecrementKeyChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnEnablePointerInteractionChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises EnablePointerInteractionChanged event.

    Declaration
    protected virtual void OnEnablePointerInteractionChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnIncrementKeyChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises IncrementKeyChanged event.

    Declaration
    protected virtual void OnIncrementKeyChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnPointerWidthChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises PointerWidthChanged event.

    Declaration
    protected virtual void OnPointerWidthChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnPositionChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises PositionChanged event.

    Declaration
    protected virtual void OnPositionChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnValueChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises ValueChanged event.

    Animation to the pointer is done here.

    Declaration
    protected virtual void OnValueChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    RefreshPointerPosition()

    Updates the position of the pointer.

    Declaration
    protected virtual void RefreshPointerPosition()
    Remarks

    Checks whether the pointer is the visual child of LinearScale and transforms the pointer to the appropriate location from the center of the gauge.

    Events

    AnimationDurationChanged

    Event that is raised when AnimationDuration property is changed.

    Declaration
    public event PropertyChangedCallback AnimationDurationChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    DecrementKeyChanged

    Event that is raised when DecrementKey property is changed.

    Declaration
    public event PropertyChangedCallback DecrementKeyChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    EnablePointerInteractionChanged

    Event that is raised when EnablePointerInteraction property is changed.

    Declaration
    public event PropertyChangedCallback EnablePointerInteractionChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    IncrementKeyChanged

    Event that is raised when IncrementKey property is changed.

    Declaration
    public event PropertyChangedCallback IncrementKeyChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    PointerWidthChanged

    Event that is raised when PointerWidth property is changed.

    Declaration
    public event PropertyChangedCallback PointerWidthChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    PositionChanged

    Event that is raised when Syncfusion.Windows.Gauge.LinearPointer.Position property is changed.

    Declaration
    public event PropertyChangedCallback PositionChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    ValueChanged

    Event that is raised when Value property is changed.

    Declaration
    public event PropertyChangedCallback ValueChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    See Also

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