Unexpected Result

3 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 15 Apr 2009 Link to this post

    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. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 16 Apr 2009 Link to this post

    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.
  3. DevCraft banner
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 16 Apr 2009 Link to this post

    Hi,

    thank you for the good explanation.

    Once again "telerik support as usual" :)

    Kind Regards

    Manfred
Back to Top