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

RadGauge crashes application when inside RadTileView

7 Answers 114 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 28 Mar 2010, 04:04 PM
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!!!

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> 
 

7 Answers, 1 is accepted

Sort by
0
Tim
Top achievements
Rank 1
answered on 28 Mar 2010, 05:22 PM
I've found one work around which it to set some kind of Width on the RadTileView.  This somehow manages to allow the Gauge to be able to calculate it's DesiredSize.

<telerikNavigation:RadTileViewItem Header="Peak Percentage" MaxWidth="250"
</telerikNavigation:RadTileViewItem> 

0
Andrey
Telerik team
answered on 29 Mar 2010, 11:51 AM
Hi Tim,

This issues used to appear in 2009.Q3 release. It has been fixed and you should not experience it with 2010.Q1. Please, download the latest release and let us know if you are able to reproduce it.

Regards,
Andrey Murzov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Abhijeet
Top achievements
Rank 1
answered on 02 Aug 2011, 11:49 PM
Not working plz send Circular Gage Chart Sample............
0
Andrey
Telerik team
answered on 05 Aug 2011, 02:08 PM
Hello Abhijeet,

Please, take a look at our demo application:

http://demos.telerik.com/silverlight/#Gauge/Gallery/RadialScale
http://demos.telerik.com/silverlight/#Gauge/Customization/RadialTickMarks
http://demos.telerik.com/silverlight/#Gauge/Customization/RadialScaleIndicators
http://demos.telerik.com/silverlight/#Gauge/Customization/RadialBarRangesBackground

I also would recommend that you take a look at the following help topics:

http://www.telerik.com/help/silverlight/radgauge-getting-started-creating-radial-gauge.html
http://www.telerik.com/help/silverlight/radial-scale-overview.html

I hope this information gets you started properly.

Regards,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
jfkrueger
Top achievements
Rank 1
answered on 09 Aug 2011, 06:01 PM
I am getting this error in the 2011 Q2 release. Circular RadGauge inside of a Silverlight Navigation Application. I have my guauges in a Content Control that is being referenced in my view like this:

<local:SpecialtyPatternsOfCareView Title="Specialty Patterns of Care"
                                   Grid.Row="1"
                                   Grid.RowSpan="2"
                                   Grid.Column="2"
                                   Grid.ColumnSpan="2"/>

It works fine when the gauge is actually in the view rather than a content control, but that is not what I need.Please advise on how to fix this issue.

Thank you.
0
Andrey
Telerik team
answered on 12 Aug 2011, 09:30 AM
Hello Jfkrueger,

It is very complicated and it is hard for us to reproduce the problem without your solution, but using just the code snippet you sent. Could you, please, provide us with a small sample solution which reproduces it?

All the best,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
jfkrueger
Top achievements
Rank 1
answered on 18 Aug 2011, 11:14 PM
Well I plugged the control back in and it is now magically working, so I can't even reproduce the issue. That was easy....
Tags
Gauge
Asked by
Tim
Top achievements
Rank 1
Answers by
Tim
Top achievements
Rank 1
Andrey
Telerik team
Abhijeet
Top achievements
Rank 1
jfkrueger
Top achievements
Rank 1
Share this question
or