Possible to disable labels?

2 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    23 posts
    Member since:
    Feb 2013

    Posted 30 Mar 2013 Link to this post

    I have the following code and wanted to hide the label markers by styling the text to be transparent.

    <gauges:RadGauge>
                                <Grid>
                                    <Grid.Resources>
                                        <gauges:GaugeValueToStringConverter x:Key="valueToStringConverter"/>
                                    </Grid.Resources>
                                    <gauges:LinearGaugeRange LabelOffset="0" LabelStep="0" MaxValue="100" MajorTickStep="100" Margin="0" TickStep="10">
                                        <gauges:LinearGaugeRange.LabelTemplate>
                                            <DataTemplate>
                                                <Border BorderBrush="Transparent" BorderThickness="0">
                                                    <TextBlock Text="{Binding}" Foreground="Transparent" FontSize="0" />
                                                </Border>
                                            </DataTemplate>
                                        </gauges:LinearGaugeRange.LabelTemplate>
                                        <gauges:SegmentedLinearGaugeIndicator Value="100">
                                            <gauges:BarIndicatorSegment Length="3" Stroke="White" Thickness="11"/>
                                            <gauges:BarIndicatorSegment Length="3" Stroke="White" Thickness="11"/>
                                        </gauges:SegmentedLinearGaugeIndicator>
                                        <gauges:LinearBarGaugeIndicator x:Name="indicator1" BarBrush="LawnGreen" BarThickness="8" IsAnimated="True"  Value="{Binding CompletionPercentage, Converter={StaticResource DoubleToIntConvertor}, FallbackValue=75}"/>
                                    </gauges:LinearGaugeRange>
                                </Grid>

                            </gauges:RadGauge>

    But that didn't work and the numbers still show.  Is there another way to accomplish this?
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 01 Apr 2013 Link to this post

    Hi Jonathan,

    The labels that you are seeing are the ticks. They do not have a template initially and they look like labels. If you set the TickStep property to 0 they will disappear. If you need ticks on the other hand, you can specify a value for the TickTemplate property.

    Regards,
    Victor
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
Back to Top