Version

Configuring the Tick Marks (XamRadialGauge)

Purpose

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.

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:

Tick Marks Overview

Tick marks overview

The radial gauge tick marks are visual elements displayed as lines at specified intervals on the gauge.

There are two types of tick marks, major and minor. Use the MinorTickCount property to specify the number of minor tick marks displayed between each major tick mark.

Preview

The next image is a preview of the XamRadialGauge with major and minor tick marks added.

Configuring Tickmarks1 1 17 1.png

Tick Mark Properties

Tick mark properties summary

The following table summarizes the XamRadialGauge control’s tick marks properties.

Property Name Property Type Description

Double

Determines the scale interval of the major tick marks.

Double

Determines the start position of major tick marks, measured from the center of the gauge. The value of this property should be between 0 and 1 and only affects major tick marks. To change the extent of minor tick marks, use the MinorTickStartExtent property.

Double

Determines the end position of major tick marks, measured from the center of the gauge. The value of this property should be between 0 and 1 and only affects major tick marks. To change the extent of minor tick marks, use the MinorTickEndExtent property.

Double

Determines the stroke thickness of the major tick marks.

Double

Determines the position at which to start rendering the minor tick marks as a value from 0 to 1, measured from the center of the gauge. Values greater than 1 can be used to make this extend further than the normal radius of the gauge.

Double

Determines the position at which to stop rendering the minor tick marks as a value from 0 to 1, measured from the center of the gauge. Values greater than 1 can be used to make this extend further than the normal radius of the gauge.

Double

Determines the number of tick marks to place between two major tick marks.

Double

Determines the thickness of minor tick marks.

Brush

Determines the brush of major tick marks. This property is used to change the brush of the major tick marks of the gauge scale.

Brush

Determines the brush used for the minor tick marks. This property is used to change the brush of the minor tick marks of the gauge scale.

Configuring the Tick Marks

Example

The screenshot below illustrates how the XamRadialGauge renders with its tick marks configured as follows:

Configuring Tickmarks1 2 17 1.png

Following is the code that implements this example

In XAML:

<ig:XamRadialGauge x:Name="radialGauge"
                   TickStartExtent = “0.4”
                   TickEndExtent = “0.5”
                   TickStrokeThickness = “1”
                   MinorTickStartExtent = “0.4”
                   MinorTickEndExtent = “0.45”
                   MinorTickCount = “10” />

In C#:

var radialGauge = new XamRadialGauge();
radialGauge.TickStartExtent = 0.4;
radialGauge.TickEndExtent = 0.5;
radialGauge.TickStrokeThickness = 1;
radialGauge.MinorTickStartExtent = 0.4;
radialGauge.MinorTickEndExtent = 0.45;
radialGauge.MinorTickCount = 10;

In Visual Basic:

Dim radialGauge As XamRadialGauge = New XamRadialGauge
radialGauge.TickStartExtent = 0.4
radialGauge.TickEndExtent = 0.5
radialGauge.TickStrokeThickness = 1
radialGauge.MinorTickStartExtent = 0.4
radialGauge.MinorTickEndExtent = 0.45
radialGauge.MinorTickCount = 10

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 ranges. It describes the properties of the ranges and provides an example of how to add ranges to the radial gauge.

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.