Error Using telerik:ThemeResourceKey

5 posts, 1 answers
  1. Heather
    Heather avatar
    54 posts
    Member since:
    Sep 2010

    Posted 04 Jan 2011 Link to this post

    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>
  2. Answer
    Dani
    Admin
    Dani avatar
    848 posts

    Posted 11 Jan 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Heather
    Heather avatar
    54 posts
    Member since:
    Sep 2010

    Posted 13 Jan 2011 Link to this post

    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.
  5. pungkook
    pungkook avatar
    1 posts
    Member since:
    Jun 2013

    Posted 27 Nov 2013 Link to this post

    when i insert RadMediaPlayer,  and debug..
    there has error message The type 'ThemeResourceKey' was not found at  InitializeComponent function.
    how can i do?
  6. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 29 Nov 2013 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready