Skip to main content
All docs

Scale.CustomLabelTemplate Property

Gets or sets a template that generates custom labels.

Namespace: DevExpress.Xpf.Gauges

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

NuGet Package: DevExpress.Wpf.Gauges


public DataTemplate CustomLabelTemplate { get; set; }

Property Value

Type Description

A template that generates custom labels.


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">
                <dxga:ScaleCustomLabel Value="{Binding Hour}"
                                       Content="{Binding RomanHour}"
                                       Visible="{Binding Visible}"/>
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