This question is locked. New answers and comments are not allowed.
Hello,
I'm trying to create a RadVerticalLinearGauge in runtime, I've made it but I cannot set the properties for NumericIndicator such as telerik:ScaleObject.RelativeWeight. How can I do this?
This is what I want to do:
And, this is my code:
I've found this thread: http://www.telerik.com/community/forums/silverlight/gauge/numberindicator.aspx, it is using an oldest release (Q1 2010). I need the same thing using a newer version. I have version 2011.3.1220.1040.
If anyone can help me, I'll be very thankful.
I'm trying to create a RadVerticalLinearGauge in runtime, I've made it but I cannot set the properties for NumericIndicator such as telerik:ScaleObject.RelativeWeight. How can I do this?
This is what I want to do:
<
telerik:NumericIndicator
Format
=
"{}{0:F0}"
Value
=
"60"
telerik:ScaleObject.RelativeWidth
=
"0.4"
telerik:ScaleObject.RelativeHeight
=
"0.1"
telerik:ScaleObject.RelativeX
=
"0.6"
telerik:ScaleObject.RelativeY
=
"0.1"
>
<
telerik:NumericIndicator.Positions
>
<
telerik:SevenSegsNumberPosition
/>
<
telerik:SevenSegsNumberPosition
/>
<
telerik:SevenSegsNumberPosition
/>
</
telerik:NumericIndicator.Positions
>
</
telerik:NumericIndicator
>
And, this is my code:
RadVerticalLinearGauge radVertical =
new
RadVerticalLinearGauge();
LinearScale linearScale =
new
LinearScale();
linearScale.Min = 0;
linearScale.Max = 100;
linearScale.LabelLocation = ScaleObjectLocation.Outside;
radVertical.Items.Add(linearScale);
BarIndicator barIndicator =
new
BarIndicator();
barIndicator.Name =
"gaugeIndicator"
;
barIndicator.Value = 50;
NumericIndicator numericIndicator =
new
NumericIndicator();
numericIndicator.Format =
"{}{0:F0}"
;
numericIndicator.Value = 60;
/*I WANT TO ADD THE SCALEOBJECT PROPERTIES HERE FOR numericIndicator*/
linearScale.Indicators.Add(numericIndicator);
linearScale.Indicators.Add(barIndicator);
Border verticalBorder =
new
Border();
verticalBorder.BorderThickness =
new
Thickness(1,0,0,0);
verticalBorder.BorderBrush =
new
SolidColorBrush(Color.FromArgb(255, 51, 102, 153));
linearScale.CustomItems.Add(verticalBorder);
I've found this thread: http://www.telerik.com/community/forums/silverlight/gauge/numberindicator.aspx, it is using an oldest release (Q1 2010). I need the same thing using a newer version. I have version 2011.3.1220.1040.
If anyone can help me, I'll be very thankful.