一般来说,对于 MVVM 和 C#,我有点新手,但我不明白为什么会出现以下 xaml 解析异常:AG_E_PARSER_BAD_TYPE
尝试解析我的事件触发器时发生异常:
<applicationspace:AnViewBase
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:c="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP7">
...在我的网格内:
<Button Name="LoginButton"
Content="Login"
Height="72"
HorizontalAlignment="Left"
Margin="150,229,0,0"
VerticalAlignment="Top"
Width="160">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<c:EventToCommand Command="{Binding LoginCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
异常发生在i:EventTrigger EventName="Click"行。
有没有人知道为什么会这样?我以前见过这种用法,而且经验不足,无法辨别为什么它对我不起作用。
我有义务提供任何帮助,并感谢您的宝贵时间。