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

Unexpected Result

2 Answers 46 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 15 Apr 2009, 11:35 PM
Hi,

I use a linear gauge and want to hide the minor ticks.
The idea was
<control:RadGauge x:Name="radGaugeRam" Width="100" Height="200" HorizontalAlignment="Left">  
    <gauge:LinearGauge> 
        <gauge:LinearScale x:Name="linearScaleRam" Min="0" Max="100" MajorTickStep="10" 
            StrokeThickness="1" Top="0.12" Left="0.55">  
            <gauge:LinearScale.MiddleTick> 
                <gauge:TickProperties Length="0.055"/>  
            </gauge:LinearScale.MiddleTick> 
            <gauge:LinearScale.MinorTick> 
                <gauge:TickProperties Visibility="Collapsed" /> 
            </gauge:LinearScale.MinorTick> 
But this results in "full width" minor ticks.
What works was
<control:RadGauge x:Name="radGaugeRam" Width="100" Height="200" HorizontalAlignment="Left">  
    <gauge:LinearGauge> 
        <gauge:LinearScale x:Name="linearScaleRam" Min="0" Max="100" MajorTickStep="10" 
            StrokeThickness="1" Top="0.12" Left="0.55">  
            <gauge:LinearScale.MiddleTick> 
                <gauge:TickProperties Length="0.055"/>  
            </gauge:LinearScale.MiddleTick> 
            <gauge:LinearScale.MinorTick> 
                <gauge:TickProperties Length="0.0" /> 
            </gauge:LinearScale.MinorTick> 
So this is not a problem - but unexpected. Normally when I set something to Collapsed it is hidden.

Another question - in the last version you implemented "MajorTickStep" - is there also something like this for Middle or Minor ticks?

Regards

Manfred

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 16 Apr 2009, 09:11 AM
Hello Manfred,

The TickProperties object doesn’t represent the tick itself, but some common properties (like length, tick width, location, background and so on) which will be applied to correspondent tick marks. So setting of the Visibility property on the TickProperties object has no effect on the tick marks visibility.

To make minor or middle tick marks invisible simple set number of correspondent ticks to 1. For example:

<gauge:LinearScale x:Name="linearScaleRam"   
           Min="0"   
           Max="100"   
           MajorTickStep="10"   
           MinorTicks="1" 
           StrokeThickness="1"   
           Top="0.1"   
           Left="0.55">  
    <gauge:LinearScale.MiddleTick> 
        <gauge:TickProperties Length="0.055"/>  
    </gauge:LinearScale.MiddleTick> 
</gauge:LinearScale> 

The MinorTicks property is set to 1. It means that every middle interval will contain only one minor value interval. The ticks are shown between value intervals. So no minor ticks will be shown.

There are no MinorTickStep nor MiddleTickStep properties, but there are MinorTicks and MiddleTicks properties. This properties sets number of the value intervals per parent interval. Correpondent tick marks (Minor and Middle) are shown between value intervals.

Greetings,
Andrey Murzov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ManniAT
Top achievements
Rank 2
answered on 16 Apr 2009, 05:35 PM
Hi,

thank you for the good explanation.

Once again "telerik support as usual" :)

Kind Regards

Manfred
Tags
Gauge
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Andrey
Telerik team
ManniAT
Top achievements
Rank 2
Share this question
or