This is a migrated thread and some comments may be shown as answers.
Cannot resolve Half Circle Gauge
4 Answers 53 Views
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 09 Jul 2010, 07:01 PM
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

4 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 12 Jul 2010, 10:03 AM
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
0
Jeremy
Top achievements
Rank 1
answered on 12 Jul 2010, 06:57 PM
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.

0
Accepted
Andrey
Telerik team
answered on 13 Jul 2010, 04:06 PM
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
0
Jeremy
Top achievements
Rank 1
answered on 13 Jul 2010, 05:10 PM
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!
Tags
Gauge
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Jeremy
Top achievements
Rank 1
Share this question
or