Indicator on the linear gauge doesn't pick the IndicatorBackground colour.

5 posts, 1 answers
  1. Vitalij
    Vitalij avatar
    5 posts
    Member since:
    Feb 2011

    Posted 22 Feb 2011 Link to this post

    I have the following code:

    <
    Gauges:RangeList>
        <Gauges:RadialRange Min="0" Max="50"
                                            StartWidth="0.02" EndWidth="0.03"
                                             Location="Inside"
                                             Background="#7F579132"
                                             BorderBrush="{x:Null}"
                                             IndicatorBackground="#FF4AB408" Offset="-0.07"/>
            <Gauges:RadialRange Min="50" Max="75"
                                              StartWidth="0.03" EndWidth="0.04"
                                              Location="Inside"
                                              Background="#7F9FAB32"
                                              BorderBrush="{x:Null}"
                                              IndicatorBackground="#FFF7E40D" Offset="-0.07"/>
         <Gauges:RadialRange Min="75" Max="100"
                                                StartWidth="0.04" EndWidth="0.05"
                                                Location="Inside"
                                                Background="#7F973C3C"
                                                BorderBrush="{x:Null}"
                                                IndicatorBackground="Red" Offset="-0.07" LabelForeground="{x:Null}"/>
                                                              
    </Gauges:RangeList>
    <Gauges:IndicatorList Height="247" Width="247">
        <Gauges:StateIndicator Left="0.8" Value="{TemplateBinding Value}" UseRangeColor="True"/>

    And the State Indicator shows the colour of the range rather than IndicatorBackground.
    What is the reason for that?
  2. Sia
    Admin
    Sia avatar
    667 posts

    Posted 24 Feb 2011 Link to this post

    Hello Vitalij,

    There is a  UseRangeColor property, which in your case is set to be true. That is why the StateIndicator gets the colors from the range, but not the default one. Here you can see more examples how you can use it.

    Greetings,
    Sia
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. UI for WPF is Visual Studio 2017 Ready
  4. Vitalij
    Vitalij avatar
    5 posts
    Member since:
    Feb 2011

    Posted 24 Feb 2011 Link to this post

    If I set UseRangeColour it still uses the colour of the range, rather thanIndicatorBackground.
    When setting UserRangeColour on other control, it works properly, but not on the the Indicator.
  5. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 01 Mar 2011 Link to this post

    Hello Vitalij,

    I'm sorry for misunderstanding. The StateIndicator differs from other indicators. It always usews a Background color of the range instead of "IndicatorBackground". It is not a bug, it works as designed.

    Best wishes,
    Andrey Murzov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  6. Vitalij
    Vitalij avatar
    5 posts
    Member since:
    Feb 2011

    Posted 01 Mar 2011 Link to this post

    Thank you, this is helpful. I have used a work around, but this would be a nice feature to have, as currently does not use IndicatorBackground property at all.
Back to Top
UI for WPF is Visual Studio 2017 Ready