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

RadialBar StartValue

1 Answer 77 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Kevin Hendriks
Top achievements
Rank 1
Kevin Hendriks asked on 26 Jan 2011, 10:58 AM
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?

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 28 Jan 2011, 04:23 PM
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>>
Tags
Gauges
Asked by
Kevin Hendriks
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or