Version

Configuring Ranges (XamRadialGauge)

Purpose

This topic provides a conceptual overview of the XamRadialGauge™ control’s ranges. It describes the properties of the ranges and provides an example of how to add ranges to the radial gauge.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This section gives you an overview of the XamRadialGauge™ control and its main features.

This topic explains using a code example how to add the XamRadialGauge™ control to a WPF application.

In this topic

This topic contains the following sections:

Ranges Overview

Ranges overview

A range highlights a set of continuous values bound by a specified minimum and maximum value on a gauge scale. You can add multiple ranges to a scale, specifying different brushes, along with starting and ending values. To add a range to the XamRadialGauge control, create a XamRadialGaugeRange object and add it to the Ranges collection.

Preview

The following image is a preview of the XamRadialGauge control with the three ranges added to it (0-3; 3-7 and 7-10).

Configuring Ranges 1 17 1.png

Range Properties

Range properties summary

The following table summarizes the properties of the XamRadialGaugeRange.

Property Name Property Type Description

Brush

The color assigned to the range

Double

The starting value at which to begin the range

Double

The ending value at which to end the range

Double

The distance from the center of the gauge (typically from 0 to 1) at which to start rendering the inner sweep of the range. Use values further from 0 than 1 to make the range extend beyond the normal radius of the gauge.

Double

The distance from the center of the gauge (typically from 0 to 1) at which to end rendering the inner sweep of the range. Use values further from 0 than 1 to make the range extend further than the normal radius of the gauge.

Double

The distance from the center of the gauge (from 0 to 1) at which to start rendering the outer sweep of the range. Use values further from 0 than 1 to make this extend further than the normal radius of the gauge.

Double

The distance from the center of the gauge (from 0 to 1) at which to end rendering the outer sweep of the range. Use values further from 0 than 1 to make this extend further than the normal radius of the gauge.

Configuring the Range

Example

The following screenshot demonstrates how the XamRadialGauge control renders using this XamRadialGaugeRange configuration:

Property Value

Blue

0

20

0.5

0.4

Configuring Ranges 2 17 1.png

Following is the code that implements this example

In XAML:

<ig:XamRadialGauge x:Name="radialGauge" >
   <ig:XamRadialGauge.Ranges>
      <ig:XamRadialGaugeRange
         Brush="Blue"
         StartValue="0"
         EndValue="20"
         OuterStartExtent=".5"
         OuterEndExtent=".4"/>
   </ig:XamRadialGauge.Ranges>
</ig:XamRadialGauge>

In C#:

var range1 = new XamRadialGaugeRange
range1.Brush = new SolidColorBrush(Colors.Blue);
range1.StartValue = 0;
range1.EndValue = 20;
range1.OuterStartExtent = 0.5;
range1.OuterEndExtent = 0.4;
radialGauge.Ranges.Add(range1);

In Visual Basic:

Dim range1 As XamRadialGaugeRange = New XamRadialGaugeRange
range1.Brush = New SolidColorBrush(Colors.Blue)
range1.StartValue = 0
range1.EndValue = 20
range1.OuterStartExtent = 0.5
range1.OuterEndExtent = 0.4
radialGauge.Ranges.Add(range1)

Related Content

The following topics provide additional information related to this topic:

Topic Purpose

This topic explains using a code example how to add the XamRadialGauge™ control to a WPF application.

This topic provides a conceptual overview of the XamRadialGauge™ control’s backing feature. It describes the properties of the backing area and provides an example of its implementation.

This topic provides a conceptual overview of labels with the XamRadialGauge™ control. It describes the properties of the labels and also provides an example of how to configure the labels.

This topic provides a conceptual overview of needles with the XamRadialGauge™ control. It describes the properties of the needles and also provides an example of how to configure them.

This topic provides a conceptual overview of the XamRadialGauge™ control’s scale. It describes the properties of the scale and also provides an example of how to implement it.

This topic provides a conceptual overview of tick marks with the XamRadialGauge™ control. It describes the tick marks’ properties and provides an example of how to implement them.