RadGauge crashes application when inside RadTileView

8 posts, 0 answers
  1. Tim
    Tim avatar
    85 posts
    Member since:
    Aug 2008

    Posted 28 Mar 2010 Link to this post

    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> 
     

  2. Tim
    Tim avatar
    85 posts
    Member since:
    Aug 2008

    Posted 28 Mar 2010 Link to this post

    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> 

  3. DevCraft banner
  4. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 29 Mar 2010 Link to this post

    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.
  5. Abhijeet
    Abhijeet avatar
    1 posts
    Member since:
    Jul 2011

    Posted 02 Aug 2011 Link to this post

    Not working plz send Circular Gage Chart Sample............
  6. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 05 Aug 2011 Link to this post

    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 >>

  7. jfkrueger
    jfkrueger avatar
    269 posts
    Member since:
    Jul 2012

    Posted 09 Aug 2011 Link to this post

    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.
  8. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 12 Aug 2011 Link to this post

    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 >>

  9. jfkrueger
    jfkrueger avatar
    269 posts
    Member since:
    Jul 2012

    Posted 18 Aug 2011 Link to this post

    Well I plugged the control back in and it is now magically working, so I can't even reproduce the issue. That was easy....
Back to Top
DevCraft banner