Gauge for WPF
Radial Gauge 機能
Gauges for WPF の使用 > Radial Gauge 機能

The Radial Gauge control uses a rotating indicator or pointer to display the value along a radial scale. The value is represented in a Radial Gauge using the Value property and the range is defined by the Min and Max properties. The Min property sets the minimum value of the gauge, while the Max property sets the maximum value of the gauge.

You can set the Min and Max properties for the Radial Gauge control as follows:

<c1:C1RadialGauge x:Name="radialGauge" Value="50" TextVisibility="All" Min="10"  Max="100" VerticalAlignment="Top" Height="294"/>
radialGauge.Min = 10;
radialGauge.Max = 100;

AutoScaling Gauge

The Radial Gauge control also provides the AutoScale property. When this property is set to true, Radial Gauge is automatically scaled to fill its containing element.

The following code shows how to set the AutoScale property:

<c1:C1RadialGauge x:Name="radialGauge" Value="50" AutoScale="True" TextVisibility="All" VerticalAlignment="Top" Height="294"/>
 radialGauge.AutoScale = true;

Reversing gauge

The Radial Gauge control has a default clockwise direction, in which the value changes across the radial frame over the time. The control also provides the IsReversed property to reorient the radial gauge so that it is drawn reversed (counter-clockwise).

The following code shows how to set a reversed Radial Gauge:

<c1:C1RadialGauge x:Name="radialGauge" Value="50" TextVisibility="All" IsReversed="True" VerticalAlignment="Top" Height="294"/>
radialGauge.IsReversed = true;

StartAngle and SweepAngle

The radial frame or scale of the Radial Gauge control can be rotated using the StartAngle and SweepAngle properties. The StartAngle sets the starting angle for the gauge, in degrees, and the SweepAngle sets the sweeping angle for the gauge, in degrees.

The following image shows a Radial Gauge with a start angle of '-90 degrees' and sweep angle of '180 degrees'.

The following code shows how to set StartAngle and SweepAngle:

<c1:C1RadialGauge x:Name="radialGauge"  StartAngle="-90" SweepAngle="180"  Value="50" Min="10"  Max="100"  Height="294"/>
radialGauge.StartAngle = -90;
radialGauge.SweepAngle = 180;