Class GaugeAnnotation
RadialAxis allows to add controls such as text and image as an annotation to a specific point of interest in the radial gauge. GaugeAnnotation provides options to add any image, text or other control over a gauge control with respect to angle or axisValue. Display the current progress or pointer value inside the gauge using a text annotation.
Inheritance
Namespace: Syncfusion.UI.Xaml.Gauges
Assembly: Syncfusion.Gauge.WinUI.dll
Syntax
public class GaugeAnnotation : ContentControl
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Annotations>
<gauge:GaugeAnnotation>
<gauge:GaugeAnnotation.Content>
<Grid Background="Pink">
<TextBlock Text="Syncfusion"
Foreground="Black" />
</Grid>
</gauge:GaugeAnnotation.Content>
</gauge:GaugeAnnotation>
</gauge:RadialAxis.Annotations>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Constructors
GaugeAnnotation()
Initializes a new instance of the GaugeAnnotation class.
Declaration
public GaugeAnnotation()
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Annotations>
<gauge:GaugeAnnotation>
<gauge:GaugeAnnotation.Content>
<Grid Background="Pink">
<TextBlock Text="Syncfusion"
Foreground="Black" />
</Grid>
</gauge:GaugeAnnotation.Content>
</gauge:GaugeAnnotation>
</gauge:RadialAxis.Annotations>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Fields
DirectionUnitProperty
Identifies the DirectionUnit dependency property.
Declaration
public static readonly DependencyProperty DirectionUnitProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for DirectionUnit dependency property. |
DirectionValueProperty
Identifies the DirectionValue dependency property.
Declaration
public static readonly DependencyProperty DirectionValueProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for DirectionValue dependency property. |
PositionFactorProperty
Identifies the PositionFactor dependency property.
Declaration
public static readonly DependencyProperty PositionFactorProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for PositionFactor dependency property. |
Properties
DirectionUnit
Gets or sets the value that indicates the direction of annotation calculated based on axis value or angle.
Declaration
public AnnotationDirection DirectionUnit { get; set; }
Property Value
Type | Description |
---|---|
AnnotationDirection | One of the enumeration values that specifies the direction unit of annotation in the radial gauge. The default is Angle. |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Annotations>
<gauge:GaugeAnnotation DirectionValue="90"
DirectionUnit="Angle">
<gauge:GaugeAnnotation.Content>
<Grid Background="Pink">
<TextBlock Text="Syncfusion"
Foreground="Black" />
</Grid>
</gauge:GaugeAnnotation.Content>
</gauge:GaugeAnnotation>
</gauge:RadialAxis.Annotations>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
DirectionValue
Gets or sets the value to adjusts the annotation distance from center. You can specify value either in axis value or angle using the DirectionUnit property.
Declaration
public double DirectionValue { get; set; }
Property Value
Type |
---|
System.Double |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Annotations>
<gauge:GaugeAnnotation DirectionValue="90">
<gauge:GaugeAnnotation.Content>
<Grid Background="Pink">
<TextBlock Text="Syncfusion"
Foreground="Black" />
</Grid>
</gauge:GaugeAnnotation.Content>
</gauge:GaugeAnnotation>
</gauge:RadialAxis.Annotations>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
PositionFactor
Gets or sets a value that specifies the position of annotation in radius factor. PositionFactor value of 0 is starting from the center and 1 is ending at the edge of the radius.
Declaration
public double PositionFactor { get; set; }
Property Value
Type |
---|
System.Double |
Examples
PositionFactor value of 0 is starting from the center and 1 is ending at the edge of the radius. PositionFactor must be between 0 to 1.
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Annotations>
<gauge:GaugeAnnotation DirectionValue="90"
DirectionUnit="Angle"
PositionFactor="0.5">
<gauge:GaugeAnnotation.Content>
<Grid Background="Pink">
<TextBlock Text="Syncfusion"
Foreground="Black" />
</Grid>
</gauge:GaugeAnnotation.Content>
</gauge:GaugeAnnotation>
</gauge:RadialAxis.Annotations>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>