Class NeedlePointer
Create the pointer to indicate the value with needle or arrow shape. NeedlePointer contains three parts, namely needle, knob, and tail and that can be placed on a gauge to mark the values.
Inherited Members
Namespace: Syncfusion.UI.Xaml.Gauges
Assembly: Syncfusion.Gauge.WinUI.dll
Syntax
public class NeedlePointer : GaugePointer
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Constructors
NeedlePointer()
Initializes a new instance of the NeedlePointer class.
Declaration
public NeedlePointer()
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Fields
KnobFillProperty
Dependency registration for KnobFill property.
Declaration
public static readonly DependencyProperty KnobFillProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
KnobRadiusProperty
Dependency registration for KnobRadius property.
Declaration
public static readonly DependencyProperty KnobRadiusProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
KnobSizeUnitProperty
Dependency registration for KnobSizeUnit property.
Declaration
public static readonly DependencyProperty KnobSizeUnitProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
KnobStrokeProperty
Dependency registration for KnobStroke property.
Declaration
public static readonly DependencyProperty KnobStrokeProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
KnobStrokeThicknessProperty
Dependency registration for KnobStrokeThickness property.
Declaration
public static readonly DependencyProperty KnobStrokeThicknessProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
NeedleEndWidthProperty
Dependency registration for NeedleEndWidth property.
Declaration
public static readonly DependencyProperty NeedleEndWidthProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
NeedleFillProperty
Dependency registration for NeedleFill property.
Declaration
public static readonly DependencyProperty NeedleFillProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
NeedleLengthProperty
Dependency registration for NeedleLength property.
Declaration
public static readonly DependencyProperty NeedleLengthProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
NeedleLengthUnitProperty
Dependency registration for NeedleLengthUnit property.
Declaration
public static readonly DependencyProperty NeedleLengthUnitProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
NeedleStartWidthProperty
Dependency registration for NeedleStartWidth property.
Declaration
public static readonly DependencyProperty NeedleStartWidthProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
TailFillProperty
Dependency registration for TailFill property.
Declaration
public static readonly DependencyProperty TailFillProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
TailLengthProperty
Dependency registration for TailLength property.
Declaration
public static readonly DependencyProperty TailLengthProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
TailLengthUnitProperty
Dependency registration for TailLengthUnit property.
Declaration
public static readonly DependencyProperty TailLengthUnitProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
TailWidthProperty
Dependency registration for TailWidth property.
Declaration
public static readonly DependencyProperty TailWidthProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
KnobFill
Gets or sets the Brush that paints the interior area of the knob.
Declaration
public Brush KnobFill { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
KnobRadius="0.02"
KnobFill="Red" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
KnobRadius
Gets or sets a value that specifies the knob radius size.
Declaration
public double KnobRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
If KnobSizeUnit is Factor, value will be given from 0 to 1. Here knob radius size is calculated by KnobRadius * axis radius value. Example: KnobRadius value is 0.2 and axis radius is 100, knob radius is 20(0.2 * 100) logical pixels. if KnobSizeUnit is Pixel, defined value is set to the knob radius.
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
KnobRadius="0.02" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
KnobSizeUnit
Gets or sets the value that indicates to calculate the knob radius in logical pixel or radius factor.
Declaration
public SizeUnit KnobSizeUnit { get; set; }
Property Value
Type | Description |
---|---|
SizeUnit |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
KnobRadius="0.02"
KnobFill="Red"
KnobStrokeThickness="2"
KnobStroke="Blue"
KnobSizeUnit="Factor" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
KnobStroke
Gets or sets a value that specifies the knob border color.
Declaration
public Brush KnobStroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
KnobRadius="0.02"
KnobFill="Red"
KnobStrokeThickness="2"
KnobStroke="Blue" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
KnobStrokeThickness
Gets or sets the width of the knob stroke outline.
Declaration
public double KnobStrokeThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
KnobRadius="0.02"
KnobStrokeThickness="2" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
NeedleEndWidth
Gets or sets a value that specifies the end width of the needle pointer.
Declaration
public double NeedleEndWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
NeedleLength="0.7"
NeedleLengthUnit="Factor"
NeedleStartWidth="10"
NeedleEndWidth="10" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
NeedleFill
Gets or sets the Brush that paints the interior area of the needle shape.
Declaration
public Brush NeedleFill { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
NeedleLength="0.7"
NeedleLengthUnit="Factor"
NeedleStartWidth="10"
NeedleEndWidth="10"
NeedleFill="Red" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
NeedleLength
Gets or sets a value that specifies the length of the needle pointer. You can specify value either in logical pixel or radius factor using the NeedleLengthUnit property.
Declaration
public double NeedleLength { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
If NeedleLengthUnit is Factor, value will be given from 0 to 1. Here needle length is calculated by NeedleLength * axis radius value. Example: NeedleLength value is 0.2 and axis radius is 100, needle length is 20(0.2 * 100) logical pixels. if NeedleLengthUnit is Pixel, defined value is set to the needle length.
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
NeedleLength="0.7" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
NeedleLengthUnit
Gets or sets a value that specifies to calculate the needle pointer length either in logical pixel or radius factor.
Declaration
public SizeUnit NeedleLengthUnit { get; set; }
Property Value
Type | Description |
---|---|
SizeUnit |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
NeedleLength="0.7"
NeedleLengthUnit="Factor" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
NeedleStartWidth
Gets or sets a value that specifies the start width of the needle pointer.
Declaration
public double NeedleStartWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
NeedleLength="0.7"
NeedleLengthUnit="Factor"
NeedleStartWidth="10" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
TailFill
Gets or sets the Brush that paints the interior area of the tail shape.
Declaration
public Brush TailFill { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
TailLength="0.1"
TailFill="Red" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
TailLength
Gets or sets a value that specifies the needle pointer tail length. You can specify value either in logical pixel or radius factor using the TailLengthUnit property.
Declaration
public double TailLength { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
If TailLengthUnit is Factor, value will be given from 0 to 1. Here tail length is calculated by TailLength * axis radius value. Example: TailLength value is 0.2 and axis radius is 100, tail length is 20(0.2 * 100) logical pixels. if TailLengthUnit is Pixel, defined value is set to the tail length.
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
TailLength="0.2" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
TailLengthUnit
Gets or sets a value that specifies to calculate the needle pointer tail length either in logical pixel or radius factor.
Declaration
public SizeUnit TailLengthUnit { get; set; }
Property Value
Type | Description |
---|---|
SizeUnit |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
TailLength="0.1"
TailFill="Red"
TailLengthUnit="Factor" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
TailWidth
Gets or sets a value that specifies the start width of the needle pointer's tail.
Declaration
public double TailWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Pointers>
<gauge:NeedlePointer Value="50"
TailLength="0.1"
TailFill="Red"
TailLengthUnit="Factor"
TailWidth="20" />
</gauge:RadialAxis.Pointers>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Methods
OnApplyTemplate()
Invoke to render NeedlePointer class.
Declaration
protected override void OnApplyTemplate()
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type | Description |
---|---|
Microsoft.UI.Xaml.Automation.Peers.AutomationPeer |
Overrides
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. |