RadialBar StartValue

2 posts, 1 answers
  1. Kevin Hendriks
    Kevin Hendriks avatar
    56 posts
    Member since:
    Feb 2009

    Posted 26 Jan 2011 Link to this post

    On my Gauage I have a Needel, this needle has a certain value. now I want the Radial bar to start at this value and then go further.
    Is this possible? Or do I need to use the radial range?
  2. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 28 Jan 2011 Link to this post

    Hi Kevin Hendriks,

    It can be implemented with radial bar, but you still should use ranges. The radial bar can use background specified in ranges. So you can setup 2 ranges: 1 with transparent indicator's background and 1 with non- transparent indicator's background, and force radial range use range background in the ProportionalBrush mode. For example:

    <telerik:RadialGauge>
        <telerik:RadialScale>
            <telerik:RangeList>
                <telerik:RangeBase Name="invisible"
                           Min="0" Max="10"
                           IndicatorBackground="Transparent" />
                <telerik:RangeBase Name="visible"
                           Min="10" Max="100"
                           IndicatorBackground="Green" />
            </telerik:RangeList>
            <telerik:IndicatorList>
                <telerik:RadialBar Name="bar" 
                           UseRangeColor="True" 
                           RangeColorMode="ProportionalBrush"
                           Value="20" />
                <telerik:Needle Name="needle" Value="10" ValueChanged="SetupRanges" />
            </telerik:IndicatorList>
        </telerik:RadialScale>
    </telerik:RadialGauge>

    private void SetupRanges(object sender, Windows.Controls.Gauges.RoutedPropertyChangedEventArgs<double> e)
    {
        if (this.needle != null)
        {
            this.invisible.Max = needle.Value;
            this.visible.Min = needle.Value;
        }
    }


    All the best,
    Andrey Murzov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top