You can add and customize the C1RadialGauge control's labeling in the Properties window, XAML, or through code. Although this topic sets the C1GaugeLabel properties of the C1RadialGauge control, the same steps can be used to customize the C1GaugeLabel of other controls.
At Design Time
To add labeling to the C1RadialGauge control in the Properties window at design time, complete the following steps:
This will set the control's label.
In XAML
To add labeling to the C1RadialGauge control in XAML add the <Gauge:C1GaugeLabel> tag to the <Gauge:C1RadialGauge> tag so that it appears similar to the following:
Markup |
Copy Code
|
---|---|
<Gauge:C1RadialGauge Height="189" Margin="42,29,188,31" Name="C1RadialGauge1" Width="189"> <Gauge:C1GaugeLabel Interval="20" Location="1" /> </Gauge:C1RadialGauge> |
In Code
Right-click the window and select View Code to open the Code Editor. Add code to the main class, so it appears similar to the following:
Visual Basic |
Copy Code
|
---|---|
Public Sub New() InitializeComponent() Dim c1gl As New C1.Xaml.Gauge.C1GaugeLabel c1gl.Location = 1 c1gl.Interval = 20 Me.C1RadialGauge1.Decorators.Add(c1gl) End Sub |
C# |
Copy Code
|
---|---|
public MainPage(){ InitializeComponent(); C1.Xaml.Gauge.C1GaugeLabel c1gl = new C1.Xaml.Gauge.C1GaugeLabel(); c1gl.Location = 1; c1gl.Interval = 20; this.C1RadialGauge1.Decorators.Add(c1gl); } |
Run your project and observe:
The C1RadialGauge control will appear with labeling: