我们的应用程序是用silverlight 3开发的,现在我想迁移到silverlight 5版本。
我在xaml中遇到错误。 “未定义的CLR名称空间.'clr-namespace'URI是指无法找到的名称空间'System.Windows.Controls.Primitives'”
<Style TargetType="controls:Calendar">
<Setter Property="Background" Value="#FFFFFFFF"/>
<Setter Property="BorderBrush" Value="#FF8E8F8F"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="#FF000000"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="CalendarButtonStyle" Value="{StaticResource System.Windows.Controls.Primitives.CalendarButton}"/>
<Setter Property="CalendarDayButtonStyle" Value="{StaticResource System.Windows.Controls.Primitives.CalendarDayButton}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:Calendar">
<StackPanel x:Name="Root" HorizontalAlignment="Center" VerticalAlignment="Top">
<controlsPrimitives:CalendarItem x:Name="CalendarItem" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Foreground="{TemplateBinding Foreground}" Style="{StaticResource System.Windows.Controls.Primitives.CalendarItem}" IsEnabled="True" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>