Class BarPointer
Create the pointer to indicate the value with linear bar shape.
Inherited Members
Namespace: Syncfusion.Maui.Gauges
Assembly: Syncfusion.Maui.Gauges.dll
Syntax
public class BarPointer : LinearPointer, IThemeElement
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.BarPointers>
<gauge:BarPointer Value="50" Position="Outside" Fill="Red" />
</gauge:SfLinearGauge.BarPointers>
</gauge:SfLinearGauge>
Constructors
BarPointer()
Initializes a new instance of the BarPointer class.
Declaration
public BarPointer()
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.BarPointers>
<gauge:BarPointer Value="50" Position="Outside" Fill="Red" />
</gauge:SfLinearGauge.BarPointers>
</gauge:SfLinearGauge>
Fields
ChildProperty
Identifies the Child bindable property.
Declaration
public static readonly BindableProperty ChildProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Child bindable property. |
CornerStyleProperty
Identifies the CornerStyle bindable property.
Declaration
public static readonly BindableProperty CornerStyleProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for CornerStyle bindable property. |
FillProperty
Identifies the Fill bindable property.
Declaration
public static readonly BindableProperty FillProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Fill bindable property. |
GradientStopsProperty
Identifies the GradientStops bindable property.
Declaration
public static readonly BindableProperty GradientStopsProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for GradientStops bindable property. |
OffsetProperty
Identifies the Offset bindable property.
Declaration
public static readonly BindableProperty OffsetProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Offset bindable property. |
PointerSizeProperty
Identifies the PointerSize bindable property.
Declaration
public static readonly BindableProperty PointerSizeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for PointerSize bindable property. |
Properties
Child
Gets or sets the child content of a BarPointer.
Declaration
public View Child { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.View | The default value is |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.BarPointers>
<gauge:BarPointer Value="50" Position="Outside" PointerSize="50" Offset="10"
CornerStyle="BothCurve">
<gauge:BarPointer.Child>
<Label Text="Bar pointer" TextColor="White" HorizontalOptions="Center"
VerticalOptions="Center"/>
</gauge:BarPointer.Child>
</gauge:BarPointer>
</gauge:SfLinearGauge.BarPointers>
</gauge:SfLinearGauge>
CornerStyle
Gets or sets a CornerStyle enumeration value that describes the corner/edge style of the BarPointer.
Declaration
public CornerStyle CornerStyle { get; set; }
Property Value
Type | Description |
---|---|
CornerStyle | A value of the enumeration. The default is BothFlat. |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.BarPointers>
<gauge:BarPointer Value="50" Position="Outside" CornerStyle="BothCurve" />
</gauge:SfLinearGauge.BarPointers>
</gauge:SfLinearGauge>
Fill
Gets or sets a value that indicates the brush used to paint the pointer interior.
Declaration
public Brush Fill { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Controls.Brush |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.BarPointers>
<gauge:BarPointer Value="50" Position="Outside" Fill="Red" />
</gauge:SfLinearGauge.BarPointers>
</gauge:SfLinearGauge>
GradientStops
Gets or sets the collection of GaugeGradientStop that specifies how interior is painted with gradient brush on the BarPointer.
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 scale. The default is an empty collection. |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.BarPointers>
<gauge:BarPointer Position="Outside"
Offset="5" CornerStyle="BothCurve"
Value="70">
<gauge:BarPointer.GradientStops>
<gauge:GaugeGradientStop Value="0" Color="Green"/>
<gauge:GaugeGradientStop Value="35" Color="#ff0074E3"/>
</gauge:BarPointer.GradientStops>
</gauge:BarPointer>
</gauge:SfLinearGauge.BarPointers>
</gauge:SfLinearGauge>
Offset
Gets or sets the value to adjusts the BarPointer position from the axis line to the custom position.
Declaration
public double Offset { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Its default value is |
Remarks
Specifies the distance between the pointer and the scale line. BarPointer rendered over the scale line by default.
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.BarPointers>
<gauge:BarPointer Value="50" Position="Outside" Offset="10" />
</gauge:SfLinearGauge.BarPointers>
</gauge:SfLinearGauge>
PointerSize
Gets or sets the value that specifies the height of BarPointer for a horizontal linear gauge, or to the width of BarPointer for a vertical linear gauge.
Declaration
public double PointerSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The size of the BarPointer, in pixels. The default value is |
Examples
<gauge:SfLinearGauge>
<gauge:SfLinearGauge.BarPointers>
<gauge:BarPointer Value="50" Position="Outside" PointerSize="10" />
</gauge:SfLinearGauge.BarPointers>
</gauge:SfLinearGauge>
Methods
OnBindingContextChanged()
Invoked whenever the binding context of the View changes.
Declaration
protected override void OnBindingContextChanged()