0

我们的应用程序是用 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>
4

0 回答 0