Set dates as labels for gauge control

2 posts, 0 answers
  1. Marko
    Marko avatar
    3 posts
    Member since:
    Jul 2008

    Posted 14 Apr 2011 Link to this post


    Is it possible to setup dates as minimum and maximum values for gauge control (with dates between as major ticks)?

    Best regards,
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 18 Apr 2011 Link to this post

    Hello Marko,

    You can use custom tick marks to show date as label of tick.
    The sample code is below.
    <UserControl x:Class="CustomTicks.MainPage"
        d:DesignHeight="300" d:DesignWidth="400">
            <DataTemplate x:Key="TickLabelAppearance">
                <TextBlock HorizontalAlignment="Center"
                       FontFamily="{Binding Path=Properties.FontFamily}"
                       FontSize="{Binding Path=Properties.FontSize}"
                       Foreground="{Binding Path=Properties.Foreground}"
                            <telerik:LabelFormatConverter />
            <Style x:Key="TickMarkStyle" TargetType="telerik:CustomTickMark">
                <Setter Property="Length" Value="0.075" />
                <Setter Property="TickWidth" Value="0.2" />
                <Setter Property="FontSize" Value="14" />
                <Setter Property="Foreground" Value="White" />
                <Setter Property="Template">
                            <Grid />
                <Setter Property="ItemTemplate" Value="{StaticResource TickLabelAppearance}" />
        <Grid x:Name="LayoutRoot" Background="White">
            <telerik:RadGauge Width="200" Height="300">
                    <telerik:LinearScale MajorTicks="4">
                            <telerik:LabelProperties Foreground="Transparent" />
                            <telerik:CustomTickMark Value="0"
                                                    Style="{StaticResource TickMarkStyle}">
                            <telerik:CustomTickMark Value="50"
                                                    Style="{StaticResource TickMarkStyle}">
                            <telerik:CustomTickMark Value="100"
                                                    Style="{StaticResource TickMarkStyle}">

    All the best,
    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top