All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Scale.CustomLabelTemplate Property

Gets or sets a template that generates custom labels.

Namespace: DevExpress.Xpf.Gauges

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

Declaration

public DataTemplate CustomLabelTemplate { get; set; }
Public Property CustomLabelTemplate As DataTemplate

Property Value

Type Description
DataTemplate

A template that generates custom labels.

Remarks

Use the CustomLabelsSource property to specify a source of custom labels:

<Style TargetType="{x:Type dxga:ArcScale}">
    <Setter Property="CustomLabelsSource" Value="{Binding RomanLabels}"/>
    <Setter Property="CustomLabelTemplate">
        <Setter.Value>
            <DataTemplate>
                <dxga:ScaleCustomLabel Value="{Binding Hour}"
                                       Content="{Binding RomanHour}"
                                       Visible="{Binding Visible}"/>
            </DataTemplate>
        </Setter.Value>
    </Setter>
</Style> 
public class WorldTimeViewModel {
    public IEnumerable<HourLabelData> RomanLabels { get; private set; }
}

public class HourLabelData : BindableBase {
    public int Hour { get; private set; }
    public string RomanHour { get; private set; }
    public bool Visible {
        get { return GetProperty(() => Visible); }
        set { SetProperty(() => Visible, value); }
    }

    public HourLabelData(int hour) {
        Hour = hour;
        RomanHour = romanHours[hour - 1];
    }
    static string[] romanHours = 
        new string[] { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII" };
}

Run Demo: Circular Scales

See Also