我遇到了一个非常烦人的错误
错误 175 XML 命名空间“ http://schemas.microsoft.com/winfx/2006/xaml/presentation ”中不存在标记“DataTrigger” 。
我正在使用带有 Silverlight 5 的 Visual Studio 2010。据我所知,参考资料还可以,但显然不行,有人可以告诉我是什么原因造成的吗
我相信这可能会解决我之前提出的另一个问题,但由于此错误而无法对其进行测试
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:iv="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
mc:Ignorable="d"
>
<UserControl.Resources>
<DataTemplate x:Key="SelectControl">
<ContentControl Content="{Binding}">
<ContentControl.Style>
<Style TargetType="ContentControl">
<Style.Triggers>
<DataTrigger Binding="{Binding BlockType}" Value="Locked">
<Setter Property="DataTemplate"
Value="{StaticResource LockedClip}" />
</DataTrigger>
<DataTrigger Binding="{Binding BlockType}" Value="Unlocked">
<Setter Property="DataTemplate"
Value="{StaticResource UnlockedClip}" />
</DataTrigger>
<DataTrigger Binding="{Binding BlockType}" Value="Unlock">
<Setter Property="DataTemplate"
Value="{StaticResource UnlockClip}" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>
</DataTemplate>
<DataTemplate x:Key="LockedClip">
<my:SingleLockedFlexBlock Height="117"/>
</DataTemplate>
<DataTemplate x:Key="UnlockedClip">
<my:SingleLockedFlexBlock Height="50"/>
</DataTemplate>
<DataTemplate x:Key="UnlockClip">
<my:SingleLockedFlexBlock Height="200"/>
</DataTemplate>
希望有人能阐明这一点吗?
保罗