Class LinearShapePointer
Represents the shape pointer that is used to indicate the value with built-in and custom shape. To highlight values, set the shape pointer type to a built-in shape, such as a circle, triangle, inverted triangle, or diamond.
Inherited Members
Namespace: Syncfusion.UI.Xaml.Gauges
Assembly: Syncfusion.Gauge.WinUI.dll
Syntax
public class LinearShapePointer : LinearMarkerPointer
Examples
The below examples shows, how to add shape pointers to linear axis in linear gauge.
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
ShapeHeight="15"
ShapeWidth="15"
ShapeType="Circle"
IsInteractive="True" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
Constructors
LinearShapePointer()
Initializes a new instance of the LinearShapePointer class.
Declaration
public LinearShapePointer()
Examples
The below examples shows, how to add shape pointers to linear axis in linear gauge.
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
ShapeHeight="15"
ShapeWidth="15"
ShapeType="Circle"
IsInteractive="True" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
Fields
FillProperty
Identifies the Fill dependency property.
Declaration
public static readonly DependencyProperty FillProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for Fill dependency property. |
HasShadowProperty
Identifies the HasShadow dependency property.
Declaration
public static readonly DependencyProperty HasShadowProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for HasShadow 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. |
ShapeHeightProperty
Identifies the ShapeHeight dependency property.
Declaration
public static readonly DependencyProperty ShapeHeightProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for ShapeHeight dependency property. |
ShapeTemplateProperty
Identifies the ShapeTemplate dependency property.
Declaration
public static readonly DependencyProperty ShapeTemplateProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for ShapeTemplate dependency property. |
ShapeTypeProperty
Identifies the ShapeType dependency property.
Declaration
public static readonly DependencyProperty ShapeTypeProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for ShapeType dependency property. |
ShapeWidthProperty
Identifies the ShapeWidth dependency property.
Declaration
public static readonly DependencyProperty ShapeWidthProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for ShapeWidth dependency property. |
StrokeProperty
Identifies the Stroke dependency property.
Declaration
public static readonly DependencyProperty StrokeProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for Stroke dependency property. |
StrokeThicknessProperty
Identifies the StrokeThickness dependency property.
Declaration
public static readonly DependencyProperty StrokeThicknessProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for StrokeThickness dependency property. |
Properties
Fill
Gets or sets the brush that paints the interior of the shape.
Declaration
public Brush Fill { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush | A |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
ShapeHeight="30"
ShapeWidth="30"
Fill="LightBlue"
Stroke="Black"
StrokeThickness="3"
ShapeType="Circle" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
HasShadow
Gets or sets a value indicating if the shape pointer has a shadow displayed.
Declaration
public bool HasShadow { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | It defines the shadow visibility of shape pointer. The default value is |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
HasShadow="True" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
IsInteractive
Gets or sets a value that indicates 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 shape pointer will be interactive or not.
If IsInteractive is true
, the shape pointer will be interactive, otherwise not.
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
IsInteractive="True" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
ShapeHeight
Gets or sets a value that specifies the marker height.
Declaration
public double ShapeHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the LinearShapePointer, in pixels. The default value is |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
ShapeHeight="30"
ShapeWidth="30"
Fill="LightBlue"
Stroke="Black"
StrokeThickness="3"
ShapeType="Circle" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
ShapeTemplate
Gets or sets the template to the LinearShapePointer for customizes the shape.
Declaration
public DataTemplate ShapeTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DataTemplate | The template for the shape pointer. The registered default is |
Remarks
Its DataContext is LinearShapePointer. A custom shape can be defined as required, when any of the build-in Shape is not sufficient.
Examples
<Page.Resources>
<DataTemplate x:Key="CustomShapePointer">
<Grid>
<Rectangle Fill="{Binding Fill}"
Stroke="{Binding Stroke}"
StrokeThickness="{Binding SrokeThickness}"
Width="{Binding ShapeHeight}"
Height="{Binding ShapeHeight}"
RadiusX="3"
RadiusY="3" />
</Grid>
</DataTemplate>
</Page.Resources>
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
ShapeTemplate="{StaticResource CustomShapePointer}" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
ShapeType
Gets or sets a value that specifies the default marker type for the pointer.
Declaration
public GaugeShapeType ShapeType { get; set; }
Property Value
Type | Description |
---|---|
GaugeShapeType | One of the enumeration values that specifies the shape type of shape pointer in the linear gauge. The default is InvertedTriangle. |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
ShapeHeight="30"
ShapeWidth="30"
Fill="LightBlue"
Stroke="Black"
StrokeThickness="3"
ShapeType="Circle" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
ShapeWidth
Gets or sets a value that specifies the marker width.
Declaration
public double ShapeWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of the LinearShapePointer, in pixels. The default value is |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
ShapeHeight="30"
ShapeWidth="30"
Fill="LightBlue"
Stroke="Black"
StrokeThickness="3"
ShapeType="Circle" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
Stroke
Gets or sets the Brush
that specifies how the shape outline to be painted.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush | A |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
ShapeHeight="30"
ShapeWidth="30"
Fill="LightBlue"
Stroke="Black"
StrokeThickness="3"
ShapeType="Circle" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
StrokeThickness
Gets or sets the value that specifies the width of the shape stroke outline.
Declaration
public double StrokeThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It specifies the width of the LinearShapePointer stroke outline. |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer Value="60"
ShapeHeight="30"
ShapeWidth="30"
Fill="LightBlue"
Stroke="Black"
StrokeThickness="3"
ShapeType="Circle" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
Methods
OnApplyTemplate()
Invoke to render LinearShapePointer class.
Declaration
protected override void OnApplyTemplate()
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
Microsoft.UI.Xaml.Automation.Peers.AutomationPeer |
OnPointerExited(PointerRoutedEventArgs)
Called when the pointer get exited.
Declaration
protected override void OnPointerExited(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | The pointer routed event arguments. |
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. |
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
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer ValueChangeCompleted="ShapePointer_ValueChangeCompleted" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
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
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.Axis>
<gauge:LinearAxis>
<gauge:LinearAxis.MarkerPointers>
<gauge:LinearShapePointer ValueChangeStarted="ShapePointer_ValueChangeStarted" />
</gauge:LinearAxis.MarkerPointers>
</gauge:LinearAxis>
</gauge:SfLinearGauge.Axis>
</gauge:SfLinearGauge>
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> |