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

StaticResources Error

1 Answer 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arpita
Top achievements
Rank 1
Arpita asked on 31 Jul 2014, 01:52 PM
This is a part of my code : 

 <Style TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
            <Setter Property="BorderBrush" Value="{x:Null}" />
            <Setter Property="Margin" Value="3" />
        </Style>

I am getting this error when I run the application.

Cannot find a Resource with the Name/Key RadButtonStyle [Line: 40 Position: 55]

How can I solve this error?

1 Answer, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 01 Aug 2014, 03:42 PM
Hello,

There are several possible reasons to receive such error.

One of them that may cause it is that you missed to refer the binaries from Themes.NoXaml folder. You might find more information about our NoXAML binaries, part of the implicit styles mechanism strategy in our documentation. The RadButtonStyle is located under Telerik.Windows.Controls.xaml file.

Another possible option is if merge the needed resource dictionaries in the wrong place, because there are some specifics related to this in Silverlight. For further reference you can check the same topic mentioned above.

Another possible problem that comes to my mind is that you use XAML binaries, which means that you style your application through telerik style manager and then you cannot base your style as you did it.

Please double-check your project references and if If the problem still persists on your side, please send us a runnable solution where the described error is observed so that we can assist you further.


Regards,
Sia
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
General Discussions
Asked by
Arpita
Top achievements
Rank 1
Answers by
Sia
Telerik team
Share this question
or