StaticResources Error

2 posts, 0 answers
  1. Arpita
    Arpita avatar
    3 posts
    Member since:
    Jul 2014

    Posted 31 Jul 2014 Link to this post

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

    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?
  2. Sia
    Sia avatar
    692 posts

    Posted 01 Aug 2014 Link to this post


    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.

    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.
Back to Top