Cannot resolve Half Circle Gauge

5 posts, 1 answers
  1. Jeremy
    Jeremy avatar
    16 posts
    Member since:
    May 2010

    Posted 09 Jul 2010 Link to this post

    Hello-

    I'm getting the error "The resource "RadialGaugeHalfCirleNStyle" could not be resolved.

           <Canvas.Resources>
                <ResourceDictionary x:Key="RadialGaugeHalfCircle">
                    <ResourceDictionary.MergedDictionaries>
                        <ResourceDictionary Source="/Telerik.Windows.Controls.Gauge;component/Themes/generic.xaml"/>
                    </ResourceDictionary.MergedDictionaries>
                </ResourceDictionary>
            </Canvas.Resources>

          <telerik:RadGauge x:Name="AttainmentGauge" VerticalAlignment="Top" Height="266" Width="358" Canvas.Top="0" Canvas.Left="709" />
            <telerik:RadialGauge Margin="100,20,0,21" Canvas.Left="688" Canvas.Top="40" Height="242" Width="200" Style="{StaticResource RadialGaugeHalfCircleNStyle}">
                <telerik:RadialScale x:Name="radialScale" Min="0" Max="1000" >
                    <telerik:IndicatorList>
                        <telerik:Marker x:Name="gauge1_marker" IsAnimated="True" Value="0" Background="LightBlue" />
                        <telerik:Needle x:Name="gauge1_needle" IsAnimated="true" Value="0" />
                    </telerik:IndicatorList>
                </telerik:RadialScale>
            </telerik:RadialGauge>

    Im using VS2010, Silverlight 4 and RadControls for Silverlight Q1 2010 SP2.

    Thoughts?

    Thanks!
    -Jeremy
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 12 Jul 2010 Link to this post

    Hi Jeremy,

    The problem is in using of x:Key attribute with the ResourceDictionary element.
    When I remove it, then the sample code works fine.

    Greetings,
    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
  3. DevCraft banner
  4. Jeremy
    Jeremy avatar
    16 posts
    Member since:
    May 2010

    Posted 12 Jul 2010 Link to this post

    Hello Andrey-

    If I remove the key, I get this error:

    error : The type 'ResourceDictionary' is inside a ResourceDictionary and does not have a key.

  5. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 13 Jul 2010 Link to this post

    Hello Jeremy Tucker,

    We cannot reproduce this issue using RadControls for Silverlight 4 version 2010.1 603. Could you, please, send to us a solution which reproduces this problem? Thank you.

    Kind 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
  6. Jeremy
    Jeremy avatar
    16 posts
    Member since:
    May 2010

    Posted 13 Jul 2010 Link to this post

    Hello and Thank you Andrey!

    I was able to figure it out.  It seems the problem was two-fold.  First, I had the ResourceDictionary inside the Canvas.Resources rather than the UserControl.Resources.  Second, I have some Style definitions and the ResourceDictionary needs to come before the Styles (and I'm not sure why).

    So it works now! Thank you for your prompt assistance!
Back to Top
DevCraft banner