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

The attachable property 'MergedDictionaries' was not found in type 'ResourceDictionary'

1 Answer 162 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kannan
Top achievements
Rank 1
Kannan asked on 02 Aug 2010, 09:58 AM
We have an application previously developed based on Telerik Silverlight Components for Silverlight V2.0. The VS 2008 based solution uses .NET 3.5 along with Silverlight 2.0.

Now we are in the process of converting this project to .NET 4.0 along with Silverlight 4.0 based Telerik Components (Trial Version).

We have converted the project sucessfully and able to build.

But we are getting the below runtime error when the "InitializeComponent();" in an user control is executed.
"The attachable property 'MergedDictionaries' was not found in type 'ResourceDictionary'"

The following is the code.

 

 

 

 

<UserControl x:Class="Test.UserControls.TestHeader"
  
  
  
xmlns:core="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
  
xmlns:navigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
  
xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
  
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
  
>
  
<telerik:ResourceDictionary.MergedDictionaries>
  
<telerik:ResourceDictionary Keys="
  
MouseOverBrush
  
BorderOuterBrush
  
SeparatorLine1
  
SeparatorLine2
  
Visible
  
Collapsed
  
RadMenu_PopupShadowBorder1
  
RadMenu_PopupShadowBorder2 
  
SelectedBrush 
  
ContentBackgroundBrush
  
DisabledBrush"
  
Source="/Test;component/UserControls/Common.xaml" />
  
</telerik:ResourceDictionary.MergedDictionaries>

 


When I mouse over the above code in the designer I get the same error.

The following are the assembly information

System.Windows.Controls
Run Time Version: v2.0.50727
C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Controls.dll
Version: 2.0.5.0

Telerik.Windows.Controls
Run Time Version: v2.0.50727
C:\Program Files\Telerik\RadControls for Silverlight Q2 2010\Binaries\Silverlight\Telerik.Windows.Controls.dll
Version: 2010.2.714.1040

Telerik.Windows.Controls.Navigation
Run Time Version: v2.0.50727
C:\Program Files\Telerik\RadControls for Silverlight Q2 2010\Binaries\Silverlight\Telerik.Windows.Controls.Navigation.dll
Version: 2010.2.714.1040

Can anybody give me clue on what is causing the exception.

Thanks

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 02 Aug 2010, 05:26 PM
Hello Kannan,

This error occurs because the ResourceDictionary is not defined in the resource collection.
You should use the following makrup:
<UserControl.Resources>
  <ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="dictionary1.xaml"/>
      <ResourceDictionary Source="dictionary2.xaml"/>
    </ResourceDictionary.MergedDictionaries>
  </ResourceDictionary>
</UserControl.Resources>

Please let me know if you need any further assistance.

Best wishes,
Vanya Pavlova
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
Tags
General Discussions
Asked by
Kannan
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or