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

Error Using telerik:ThemeResourceKey

4 Answers 213 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Betsy
Top achievements
Rank 1
Betsy asked on 04 Jan 2011, 09:00 PM

I have a ResourceDictionary xaml file that I use for centralized styling.  In it I'm trying to use the style below but am getting an error:
Error 1 The type 'telerik:ThemeResourceKey' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Development\BestpassEM\WPFInfrastructure\Styles\ControlStyles.xaml 36 65 Miscellaneous Files
I have the namespace def at the top of my file (xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" ) what else would I need?

I did have this working but then had to switch my target framework from 4.0 Client Profile to the full verion of 4.0 (to support the telerik ReportViewer control).  What could that have broken?

<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Windows7Theme, ElementType=TextBox}}" x:Key="EditTextStyle">
  <Setter Property="HorizontalAlignment" Value="Left" />
  <Setter Property="Margin" Value="2" />
  <Setter Property="Foreground" Value="#333333" />
  <!--<Setter Property="Height" Value="22" />
  <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />-->
  <Setter Property="Validation.ErrorTemplate" Value="{StaticResource validationTemplate}"/>
  <Style.Triggers>
    <Trigger Property="Validation.HasError" Value="True">
      <Setter Property="ToolTip"
      Value="{Binding RelativeSource={RelativeSource Self},
                      Path=(Validation.Errors).CurrentItem.ErrorContent}"/>
    </Trigger>
  </Style.Triggers>
</Style>

4 Answers, 1 is accepted

Sort by
0
Accepted
Dani
Telerik team
answered on 11 Jan 2011, 10:01 AM
Hello Heather,

 We apologize for the delayed answer.


You also need a reference to Telerik.Windows.Controls in your project. Please , check if you have that in your namespace definitions.

If that does not help, would it be possible for you to send us a sample which we can test for you ?

Kind regards,
Dani
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Betsy
Top achievements
Rank 1
answered on 13 Jan 2011, 09:52 PM
Now I apologize for the delayed answer...moved onto other things.  Whatever the problem was was resolved by shutting down and re-opening the project.  Visual Studio just seemed to get completely out of whack.  Sorry I forgot to close the problem.
0
pungkook
Top achievements
Rank 1
answered on 27 Nov 2013, 09:02 AM
when i insert RadMediaPlayer,  and debug..
there has error message The type 'ThemeResourceKey' was not found at  InitializeComponent function.
how can i do?
0
Evgenia
Telerik team
answered on 29 Nov 2013, 09:01 AM

Hi pungkook,

This is known issue with RadMediaPlayer as of Q3 2013 and is already fixed. Please download our latest internal build (released every Monday) from your account which contains the fix. 



Regards,

Evgenia
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.

Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.

Sign up for Free application insights >>
Tags
General Discussions
Asked by
Betsy
Top achievements
Rank 1
Answers by
Dani
Telerik team
Betsy
Top achievements
Rank 1
pungkook
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or