Click here to Skip to main content
15,922,533 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I'm working an application that is based on Silverlight 5. It's framework 4.5 is MVVM architecture and implemented by Prism. I'm using silverlight 5 toolkit too.

<ResourceDictionary
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"                               
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:system="clr-namespace:System;assembly=mscorlib"
            xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
            xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
            xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"    
            xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"  
            xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
            xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input"
            xmlns:controlsPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls"
            xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
            xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"    
            xmlns:telerikTabControl="clr-namespace:Telerik.Windows.Controls.TabControl;assembly=Telerik.Windows.Controls.Navigation"
            xmlns:telerikNavigationPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls.Navigation"
            xmlns:local="clr-namespace:UFone_CRM_UI.Themes"
            xmlns:dataPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:Telerik_Windows_Controls_GridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">

<ControlTemplate TargetType="controls:Calendar">
                <StackPanel x:Name="Root" HorizontalAlignment="Center" VerticalAlignment="Top">
                    <controlsPrimitives:CalendarItem x:Name="CalendarItem" removed="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Foreground="{TemplateBinding Foreground}" Style="{StaticResource System.Windows.Controls.Primitives.CalendarItem}" IsEnabled="True" />
                </StackPanel>
            </ControlTemplate>
<controlsPrimitives:DatePickerTextBox x:Name="TextBox" Margin="0,0,20,0" Height="22" Background="{TemplateBinding Background}" Selectionremoved="{TemplateBinding SelectionBackground}" BorderThickness="1,1,0,1" Foreground="{TemplateBinding Foreground}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Style="{StaticResource System.Windows.Controls.Primitives.DatePickerTextBox}"/> 


This sample buid successed but at runtime in InitializeComponent() method I got this Error =>
 The type 'controlsPrimitives:CalendarItem' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built
The type 'controlsPrimitives:DatePickerTextBox' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built 



If I delete controls, CalenderItem or DatePickerTextBox the Error do not occur.

How can I solve this problem.
Posted
Updated 22-Jul-13 23:19pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900