【发布时间】:2014-06-15 03:43:40
【问题描述】:
我无法在我的 Windows Phone 8.1 应用程序中使用 EventToCommand。
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8"
我也尝试了 assembly=GalaSoft.MvvmLight.Extras.WP81...
<controls:PivotItem Name="pivotItem">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<cmd:EventToCommand Command="{Binding SelectServiceCommand}"
CommandParameter="{Binding SelectedIndex, ElementName=pivotItem}"/>
</i:EventTrigger>
<!-- other stuff -->
</i:Interaction.Triggers>
我得到以下错误:
- “触发器”成员无法识别或无法访问。
- XML 命名空间“clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity”中的未知类型“EventTrigger”
- 错误 2 在类型“交互”中找不到可附加属性“触发器”。 ...
有人可以帮帮我吗?
【问题讨论】:
标签: windows-phone-8 mvvm-light windows-phone-8.1 eventtocommand