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

ScaleLabelOptions.ShowFirst Property

Gets or sets a value indicating whether the first label should be shown on a scale.

Namespace: DevExpress.Xpf.Gauges

Assembly: DevExpress.Xpf.Gauges.v19.1.dll

Declaration

public bool ShowFirst { get; set; }

Property Value

Type Description
Boolean

true to display the first label on a scale; otherwise false.

Property Paths

You can access this nested property as listed below:

Object Type Path to ShowFirst
ArcScale
.LabelOptions.ShowFirst
LinearScale
.LabelOptions.ShowFirst

Remarks

Use the ShowFirst and ScaleLabelOptions.ShowLast properties to show or hide the first and last labels on a scale. This may be required, for example, when these labels are both displayed at the same position and the resulting gauge looks ugly. In this case, you can hide the first label by setting the ShowFirst property to false.

The table bellow illustrates the properties behavior.

ShowFirst=True, ShowLast=True ShowFirst=False, ShowLast=True ShowFirst=True, ShowLast=False
Label_ShowFirst_ShowLast_True Label_ShowFirst_False_ShowLast-True Label_ShowFirst-True-ShowLast-False

For more information on labels, refer to labels (Circular scale) and labels (Linear scale) documents.

Example

This example illustrates how to create a CircularGaugeControl instance with a single ArcScale object.

<Window x:Class="DXGauges_Circular.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" >
            <dxga:CircularGaugeControl.Model>
                <dxga:CircularRedClockModel />
            </dxga:CircularGaugeControl.Model>
            <dxga:CircularGaugeControl.Scales>
                <dxga:ArcScale StartValue="0" EndValue="12" 
                               StartAngle="-90" EndAngle="270"
                               MajorIntervalCount="12" MinorIntervalCount="5">
                    <dxga:ArcScale.LabelOptions>
                        <dxga:ArcScaleLabelOptions ShowFirst="False" Orientation="LeftToRight" />
                    </dxga:ArcScale.LabelOptions>
                    <dxga:ArcScale.Needles>
                        <dxga:ArcScaleNeedle Value="3" />
                        <dxga:ArcScaleNeedle Value="12" />
                    </dxga:ArcScale.Needles>
                    <dxga:ArcScale.Markers>
                        <dxga:ArcScaleMarker Value="7" />
                    </dxga:ArcScale.Markers>
                    <dxga:ArcScale.RangeBars>
                        <dxga:ArcScaleRangeBar AnchorValue="7" Value="3" />
                    </dxga:ArcScale.RangeBars>
                    <dxga:ArcScale.Layers>
                        <dxga:ArcScaleLayer />
                    </dxga:ArcScale.Layers>
                    <dxga:ArcScale.Ranges>
                        <dxga:ArcScaleRange StartValue="0" EndValue="4" />
                        <dxga:ArcScaleRange StartValue="4" EndValue="8" />
                        <dxga:ArcScaleRange StartValue="8" EndValue="12" />
                    </dxga:ArcScale.Ranges>
                </dxga:ArcScale>
            </dxga:CircularGaugeControl.Scales>
        </dxga:CircularGaugeControl>
    </Grid>
</Window>

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowFirst 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