Skip to main content
A newer version of this page is available. .

AnalogGaugeControl.ScalePanelTemplate Property

Gets or sets a panel template that specifies how to arrange scales within a Gauge control.

Namespace: DevExpress.Xpf.Gauges

Assembly: DevExpress.Xpf.Gauges.v18.2.dll

Declaration

public ItemsPanelTemplate ScalePanelTemplate { get; set; }

Property Value

Type Description
ItemsPanelTemplate

A ItemsPanelTemplate object that is a panel template.

Example

This example demonstrates the process of creating a Circular gauge with two side-by-side scales.

To do this, it is necessary to define a custom panel template and assign it to the AnalogGaugeControl.ScalePanelTemplate property. For example, the code below illustrates how to use System.Windows.Controls.Grid to arrange two ArcScale objects side-by-side in two columns.

<Window x:Class="SideBySideCircularScales.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxga="http://schemas.devexpress.com/winfx/2008/xaml/gauges"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <dxga:CircularGaugeControl Name="circularGaugeControl1">
            <!--region #ScalePanelTemplate-->
            <dxga:CircularGaugeControl.ScalePanelTemplate>
                <ItemsPanelTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ItemsPanelTemplate>
            </dxga:CircularGaugeControl.ScalePanelTemplate>
            <!--endregion #ScalePanelTemplate-->
            <dxga:CircularGaugeControl.Scales>
                <dxga:ArcScale StartValue="0"   EndValue="60"  
                               StartAngle="-90" EndAngle="270" 
                               Grid.Column="0"
                               MajorIntervalCount="12">
                    <dxga:ArcScale.Needles>
                        <dxga:ArcScaleNeedle Value="15" />
                    </dxga:ArcScale.Needles>
                    <dxga:ArcScale.LabelOptions>
                        <dxga:ArcScaleLabelOptions ShowFirst="False" />
                    </dxga:ArcScale.LabelOptions>
                </dxga:ArcScale>
                <dxga:ArcScale StartValue="0"   EndValue="60"  
                               StartAngle="-90" EndAngle="270" 
                               Grid.Column="1"
                               MajorIntervalCount="12">
                    <dxga:ArcScale.Needles>
                        <dxga:ArcScaleNeedle Value="5" />
                    </dxga:ArcScale.Needles>
                    <dxga:ArcScale.LabelOptions>
                        <dxga:ArcScaleLabelOptions ShowFirst="False" />
                    </dxga:ArcScale.LabelOptions>                    
                </dxga:ArcScale>
            </dxga:CircularGaugeControl.Scales>
        </dxga:CircularGaugeControl>
    </Grid>
</Window>

The following code snippets (auto-collected from DevExpress Examples) contain references to the ScalePanelTemplate property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also