Skip to main content

LinearScaleLevelBarCollection Class

A collection that stores the level bars of a particular linear scale.

Namespace: DevExpress.UI.Xaml.Gauges

Assembly: DevExpress.UI.Xaml.Gauges.v21.2.dll

NuGet Package: DevExpress.Uwp.Controls

Declaration

public class LinearScaleLevelBarCollection :
    LinearScaleIndicatorCollection<LinearScaleLevelBar>

The following members return LinearScaleLevelBarCollection objects:

Remarks

Each linear scale can hold a collection of level bars returned by the LinearScale.LevelBars property and represented by the LinearScaleLevelBarCollection class. Each collection item is an instance of the LinearScaleLevelBar class and can be accessed via the Item[] property of a LinearScaleLevelBarCollection object.

For more information on level bars, refer to the Level Bar (Linear Scale) document.

Example

The following example demonstrates how to create a Linear Gauge with two ranges and one level bar.

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:LinearGaugeLesson"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Gauges="using:DevExpress.UI.Xaml.Gauges"
    x:Class="LinearGaugeLesson.MainPage"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">

        <Gauges:LinearGauge Margin="20">
            <Gauges:LinearGauge.Scales>
                <Gauges:LinearScale StartValue="-100" EndValue="100" MajorIntervalCount="20" >
                    <Gauges:LinearScale.Ranges>
                        <Gauges:LinearScaleRange StartValue="-100" EndValue="0"/>
                        <Gauges:LinearScaleRange StartValue="0" EndValue="100"/>
                    </Gauges:LinearScale.Ranges>
                    <Gauges:LinearScale.LevelBars>
                        <Gauges:LinearScaleLevelBar Value="20" />
                    </Gauges:LinearScale.LevelBars>
                </Gauges:LinearScale>
            </Gauges:LinearGauge.Scales>
        </Gauges:LinearGauge>

    </Grid>
</Page>
See Also