I am receiving this error when using a very simple Gauge markup. I have tried commenting out various things and nothing works. There is NO code behaind and no data being loaded. The Gauge simply just doesn't work. It is being "hosted" inside of a RadTileView so I don't know if that's the issue or not. When I un-comment the "LinearScale" inside the gauge, it's even worse and says "Value does not fall within expected range". I really need help on this!!!
Markup:
Line: 56 |
Error: Unhandled Error in Silverlight Application |
Code: 4004 |
Category: ManagedRuntimeError |
Message: System.InvalidOperationException: MeasureOverride of element 'Telerik.Windows.Controls.Gauges.LinearGauge' should not return PositiveInfinity or NaN as its DesiredSize. |
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight) |
Markup:
<UserControl |
x:Class="UnitGuageView" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
xmlns:commands="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation" |
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" |
xmlns:telerikGuage="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Gauge" |
xmlns:telerikGauges="clr-namespace:Telerik.Windows.Controls.Gauges;assembly=Telerik.Windows.Controls.Gauge" |
mc:Ignorable="d" |
d:DesignWidth="640" d:DesignHeight="480"> |
<UserControl.Resources> |
<!-- removed for brevity... --> |
</UserControl.Resources> |
<Grid x:Name="LayoutRoot" Background="White"> |
<Grid.RowDefinitions> |
<RowDefinition Height="Auto" /> |
<RowDefinition Height="*" /> |
</Grid.RowDefinitions> |
<Border Grid.Row="0" Background="#FF151515" Padding="4"> |
<!--<HyperlinkButton x:Name="lnkCustomize" |
Content="Customize..." |
commands:Click.Command="{Binding OnCustomizeChart}" |
/>--> |
</Border> |
<telerikGuage:RadGauge x:Name="gauge" Grid.Row="1"> |
<telerikGauges:LinearGauge> |
<!-- |
<telerikGauges:LinearScale x:Name="linearScale" Min="0" Max="100"> |
<telerikGauges:LinearScale.MajorTick> |
<telerikGauges:MajorTickProperties Location="OverCenter" /> |
</telerikGauges:LinearScale.MajorTick> |
<telerikGauges:LinearScale.MiddleTick> |
<telerikGauges:MiddleTickProperties Location="OverCenter" Length="0.07" /> |
</telerikGauges:LinearScale.MiddleTick> |
<telerikGauges:LinearScale.MinorTick> |
<telerikGauges:MinorTickProperties Location="OverCenter" Length="0.055" /> |
</telerikGauges:LinearScale.MinorTick> |
<telerikGauges:RangeList> |
<telerikGauges:LinearRange |
Min="0" Max="50" |
StartWidth="0.04" EndWidth="0.04" Location="OverCenter" |
Background="{StaticResource green}" BorderBrush="#7FFFFFFF" |
/> |
<telerikGauges:LinearRange |
Min="50" Max="75" |
StartWidth="0.04" EndWidth="0.04" Location="OverCenter" |
Background="{StaticResource yellow}" BorderBrush="#7FFFFFFF" |
/> |
<telerikGauges:LinearRange |
Min="75" Max="100" |
StartWidth="0.04" EndWidth="0.04" Location="OverCenter" |
Background="{StaticResource red}" BorderBrush="#7FFFFFFF" |
/> |
</telerikGauges:RangeList> |
<telerikGauges:IndicatorList> |
<telerikGauges:Marker x:Name="needleIndicator" |
Location="Outside" |
RelativeHeight="0.04" |
RelativeWidth="0.08" |
Style="{StaticResource LinearMarkerStyle}" |
Value="50" |
/> |
</telerikGauges:IndicatorList> |
</telerikGauges:LinearScale> |
--> |
</telerikGauges:LinearGauge> |
</telerikGuage:RadGauge> |
</Grid> |
</UserControl> |