# Creating WPF Numeric Gauge

One of the gauges you can create with the **RadGauge** control, is a numeric gauge. It is represented by a container with a numerical scale in it. The numerical scale uses a numerical indicator to display the desired value. This topic will walk you through the creation of a sample application that contains a numeric RadGauge.

## Adding Telerik Assemblies Using NuGet

To use **RadGauge** when working with NuGet packages, install the `Telerik.Windows.Controls.DataVisualization.for.Wpf.Xaml` package. The [package name may vary](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/available-packages) slightly based on the Telerik dlls set - [Xaml or NoXaml](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml)

Read more about NuGet installation in the [Installing UI for WPF from NuGet Package](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/nuget-installation) article.

> tip With the 2025 Q1 release, the Telerik UI for WPF has a new licensing mechanism. You can learn more about it [here](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key).

## Adding Assembly References Manually

If you are not using NuGet packages, you can add a reference to the following assemblies:

* **Telerik.Licensing.Runtime**
* **Telerik.Windows.Controls**
* **Telerik.Windows.Controls.DataVisualization**

## Defining a Numeric Gauge with a NumericScale

Unlike the [radial](https://www.telerik.com/products/wpf/documentation/controls/radgauge/getting-started/creating-radial-gauge#defining-a-radialgauge-with-a-radialscale) and [linear](https://www.telerik.com/products/wpf/documentation/controls/radgauge/getting-started/creating-linear-gauge#defining-a-linear-gauge-with-a-linear-scale) scales, the numeric scale doesn't require a special container. However you can use any of the 9 radial gauge and 2 linear gauge controls to wrap the **NumericScale** control. Additionally, you can put a **NumericScale** in a **Grid** container too. In order to define a numerical scale inside the **Gauge** control, you have to use the **NumericScale** control. The **Gauge** works as an **ItemsControl**, which takes **NumericScale** controls as items. This means that you can have more than one scale inside the gauge.

> To use the **RadGauge** control and its components in XAML you have to declare the following namespace:
> `xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"`

**Example 1: Creating RadHorizontalLinearGauge with a NumericScale**

```XAML
<telerik:RadHorizontalLinearGauge Width="200" Height="50">
    <telerik:NumericScale Min="0" Max="999">
    </telerik:NumericScale>
</telerik:RadHorizontalLinearGauge>
```

> tip To learn more about the usage of the **NumericScale** control read the [Numeric Scale](https://www.telerik.com/products/wpf/documentation/controls/radgauge/numeric-scale/overview) topic.

## Defining a Numeric Indicator

The **NumericScale** control allows you to display numeric indicators that represent a value on the scale. To specify an indicator use the **Indicators** property, which is of type **ItemCollection**. This means that the **Indicators** property can hold more than one indicator.

**Example 2: Adding Indicators**

```XAML
<telerik:RadHorizontalLinearGauge Width="200" Height="50">
    <telerik:NumericScale Min="0" Max="999">
        <telerik:NumericScale.Indicators>
            <telerik:NumericIndicator telerik:ScaleObject.RelativeX="0.05"
                                telerik:ScaleObject.RelativeY="0.05"
                                telerik:ScaleObject.RelativeHeight="0.9*"
                                telerik:ScaleObject.RelativeWidth="0.9*"
                                FontSize="30">
                <telerik:NumericIndicator.Positions>
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                </telerik:NumericIndicator.Positions>
            </telerik:NumericIndicator>
        </telerik:NumericScale.Indicators>
    </telerik:NumericScale>
</telerik:RadHorizontalLinearGauge>
```

> tip To learn more about the usage of the **NumericIndicator** control, read the [Numeric Indicator](https://www.telerik.com/products/wpf/documentation/controls/radgauge/features/numeric-indicator/indicators-numeric-indicator) topic.

> caption Image 1: result from example 2

![RadHorizontalLinearGauge with indicator](https://www.telerik.com/products/wpf/documentation/assets/2fefdd0a5a587df0ce0aef1efd94aa2c/radgauge_gettingstarted_numericgauge_03.png)

> The examples in this article are styled with the [Windows8](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/themes-suite/windows8) theme.

## Set Indicator's Position

To make the indicator display a certain value on the scale, you have to use the **Value** property of the indicator.

**Example 3: Setting indicator's position**

```XAML
<telerik:RadHorizontalLinearGauge Width="200" Height="50">
    <telerik:NumericScale Min="0" Max="999">
        <telerik:NumericScale.Indicators>
            <telerik:NumericIndicator telerik:ScaleObject.RelativeX="0.05"
                                telerik:ScaleObject.RelativeY="0.05"
                                telerik:ScaleObject.RelativeHeight="0.9*"
                                telerik:ScaleObject.RelativeWidth="0.9*"
                                FontSize="30"
                                Value="100">
                <telerik:NumericIndicator.Positions>
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                    <telerik:FontNumberPosition Background="#FFD6D4D4" />
                </telerik:NumericIndicator.Positions>
            </telerik:NumericIndicator>
        </telerik:NumericScale.Indicators>
    </telerik:NumericScale>
</telerik:RadHorizontalLinearGauge>
```

> caption Image 2: result from example 3

![RadHorizontalLinearGauge with Indicator position](https://www.telerik.com/products/wpf/documentation/assets/3e28dac641da795ed1c30f597e4a734b/radgauge_gettingstarted_numericgauge_04.png)

## Telerik UI for WPF Learning Resources

* [Telerik UI for WPF Gauge Component](https://www.telerik.com/products/wpf/gauge.aspx)
* [Getting Started with Telerik UI for WPF Components](https://www.telerik.com/products/wpf/documentation/getting-started/first-steps-nuget)
* [Telerik UI for WPF Installation](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/installation-guide)
* [Telerik UI for WPF and WinForms Integration](https://www.telerik.com/products/wpf/documentation/common-information/winforms-integration/overview)
* [Telerik UI for WPF Visual Studio Templates](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-templates)
* [Setting a Theme with Telerik UI for WPF](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview)
* [Telerik UI for WPF Virtual Classroom (Training Courses for Registered Users)](https://learn.telerik.com/learn/course/external/view/elearning/16/telerik-ui-for-wpf)
* [Telerik UI for WPF License Agreement](https://www.telerik.com/purchase/license-agreement/wpf-dlw-s)

## See Also

* [Ranges](https://www.telerik.com/products/wpf/documentation/controls/radgauge/features/ranges/gauge-range)
* [Numeric Indicator](https://www.telerik.com/products/wpf/documentation/controls/radgauge/features/numeric-indicator/indicators-numeric-indicator)
* [State Indicator](https://www.telerik.com/products/wpf/documentation/controls/radgauge/features/indicators/state-indicator)
