【发布时间】:2017-04-07 15:53:32
【问题描述】:
我无法弄清楚我缺少哪个资源才能使其正常工作,我收到消息 ei namespace is not found。
<Button
Name="btnEnter"
Click="btnEnter_Click"
Style="{StaticResource SignButtons}"
FontFamily="Comic"
FontSize="24"
FontWeight="DemiBold"
Grid.Column="3"
Height="51.562"
Width="75"
Margin="30,23.624,0,0"
Grid.Row="3"
Template="{DynamicResource EnterButton}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ei:ChangePropertyAction
TargetObject="{Binding ElementName=btnMultiplication}"
PropertyName="IsEnabled" Value="False"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
这里是命名空间
<Window x:Class="Button_Template.MainWindow"
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:local="clr-namespace:Button_Template"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="http://schemas.microsoft.com/netfx/2009/xaml/presentation"
mc:Ignorable="d"
【问题讨论】:
-
向我们展示来自 XAML 根元素的 XML 命名空间,应该很容易发现。
-
尝试添加这个xmlns
xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" -
我已经添加了命名空间,现在错误消息不同了 - ChangePropertyAction 不存在于 "clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Intera动作”