This is a migrated thread and some comments may be shown as answers.

Possible to disable labels?

1 Answer 55 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonathan
Top achievements
Rank 1
Jonathan asked on 30 Mar 2013, 09:28 PM
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?

1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 01 Apr 2013, 07:16 AM
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.
Tags
Gauge
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or