So i have something in the wrong place? Looks right to me but the Scale is still not being displayed.
Partial Public Class MainPage |
Inherits UserControl |
Private autoRange As RadialRange |
Private AutoRangeR As RadialRange |
Private AutoRangeY As RadialRange |
Private autoscale As RadialScale |
Private autoneedle As Needle |
Public Sub New() |
InitializeComponent() |
AddHandler Loaded, AddressOf SilverlightControl_Loaded |
End Sub |
Private Sub SilverlightControl_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) |
' create the RadGauge |
Dim radGauge = New RadGauge() |
' add RadGauge to the LayoutRoot |
LayoutRoot.Children.Add(radGauge) |
' create the RadialGauge |
Dim gauge = New RadialGauge() |
' add RadialGauge to the RadGauge |
radGauge.Content = gauge |
' create the RadialScale |
autoscale = New RadialScale() |
autoscale.Name = "RadialScale22" |
autoscale.Min = 0 |
autoscale.Max = 100 |
autoscale.MinorTicks = 2 |
autoscale.MiddleTicks = 2 |
autoscale.Radius = 75 |
' add RadialScale to the RadialGauge |
gauge.Items.Add(autoscale) |
Dim RangeList1 = New RangeList() |
autoscale.Items.Add(RangeList1) |
'Create the Range Green |
autoRange = New RadialRange() |
autoRange.Name = "Green" |
autoRange.StartWidth = 0.06 |
autoRange.EndWidth = 0.06 |
autoRange.Min = 90 |
autoRange.Max = 100 |
autoRange.Background = New SolidColorBrush(Colors.Green) |
autoscale.Ranges.Add(autoRange) |
'Create the Range Yellow |
AutoRangeY = New RadialRange() |
autoRangeY.Name = "Yellow" |
autoRangeY.StartWidth = 0.06 |
autoRangeY.EndWidth = 0.06 |
autoRangeY.Min = 40 |
autoRangeY.Max = 50 |
autoRangeY.Background = New SolidColorBrush(Colors.Yellow) |
autoscale.Ranges.Add(autoRangeY) |
'Create the Range Red |
AutoRangeR = New RadialRange() |
autoRangeR.Name = "Red" |
autoRangeR.StartWidth = 0.06 |
autoRangeR.EndWidth = 0.06 |
autoRangeR.Min = 0 |
autoRangeR.Max = 10 |
autoRangeR.Background = New SolidColorBrush(Colors.Red) |
autoscale.Ranges.Add(autoRangeR) |
Dim IndicatorList1 = New IndicatorList() |
autoscale.Items.Add(IndicatorList1) |
' create the Needle |
autoneedle = New Needle() |
autoneedle.Value = 0 |
' add needle to indicators collection |
autoscale.Indicators.Add(autoneedle) |
End Sub |