This question is locked. New answers and comments are not allowed.
I am very new to Silverlight so please forgive me if this is an incredibly basic question. I have a gauge with 4 ranges. I do not know some of the min/max values at design time so I enter values as placeholders. When the control fires up, I am updating the values based on data passed in from a WCF service. Everything sets correctly and no errors are thrown, but the gaugue is never updated with the new ranges. Here is my xaml:
Here is the code:
Can someone please enlighten me as to why this code has no effect and show me the proper way to update ranges in code?
Thanks!
<
telerik:RadGauge
Name
=
"RadGaugeOverallQuality"
VerticalAlignment
=
"Top"
Margin
=
"25,25,25,25"
Height
=
"150"
Width
=
"150"
>
<
Grid
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
>
<
telerik:RadialGauge
>
<
telerik:RadialScale
x:Name
=
"radialScale"
Min
=
".5"
Max
=
"1.5"
MajorTickStep
=
".1"
>
<
telerik:RangeList
>
<
telerik:RangeBase
Name
=
"RangeOverallQualitySignificantlyBad"
Min
=
".5"
Max
=
".75"
IndicatorBackground
=
"DarkRed"
/>
<
telerik:RangeBase
Name
=
"RangeOverallQualityStandardBad"
IndicatorBackground
=
"Red"
Min
=
".75"
Max
=
"1"
/>
<
telerik:RangeBase
Name
=
"RangeOverallQualityStandardGood"
IndicatorBackground
=
"Green"
Min
=
"1"
Max
=
"1.25"
/>
<
telerik:RangeBase
Name
=
"RangeOverallQualitySignificantlyBetter"
IndicatorBackground
=
"LimeGreen"
Min
=
"1.25"
Max
=
"1.5"
/>
</
telerik:RangeList
>
<
telerik:IndicatorList
>
<
telerik:RadialBar
Name
=
"bar"
UseRangeColor
=
"True"
RangeColorMode
=
"ProportionalBrush"
Value
=
"20"
/>
<
telerik:Needle
x:Name
=
"gauge1_needle"
IsAnimated
=
"true"
Value
=
"0"
/>
</
telerik:IndicatorList
>
<
telerik:RadialScale.MajorTick
>
<
telerik:MajorTickProperties
/>
</
telerik:RadialScale.MajorTick
>
<
telerik:RadialScale.Label
>
<
telerik:LabelProperties
FontSize
=
"10"
Format
=
"{}{0:F2}"
/>
</
telerik:RadialScale.Label
>
</
telerik:RadialScale
>
</
telerik:RadialGauge
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"0.60*"
/>
<
RowDefinition
Height
=
"0.40*"
/>
</
Grid.RowDefinitions
>
<
TextBlock
Grid.Row
=
"1"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Center"
Foreground
=
"GhostWhite"
FontFamily
=
"CourierNew"
>
</
TextBlock
>
</
Grid
>
</
Grid
>
</
telerik:RadGauge
>
Here is the code:
RangeOverallQualitySignificantlyBad.Min = .5
RangeOverallQualitySignificantlyBad.Max = lResult(
"OverallQualityIndexConfidenceIntervalMin"
)
RangeOverallQualityStandardBad.Min = lResult(
"OverallQualityIndexConfidenceIntervalMin"
)
RangeOverallQualityStandardBad.Max = 1
RangeOverallQualityStandardGood.Min = 1
RangeOverallQualityStandardGood.Max = lResult(
"OverallQualityIndexConfidenceIntervalMax"
)
RangeOverallQualitySignificantlyBetter.Min = lResult(
"OverallQualityIndexConfidenceIntervalMax"
)
RangeOverallQualitySignificantlyBetter.Max = 1.5
RadGaugeOverallQuality.UpdateLayout
Can someone please enlighten me as to why this code has no effect and show me the proper way to update ranges in code?
Thanks!