2
我正在尝试修改Windows Phone 7 TrainingKit(http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=ca23285f-bab8-47fa-b364-11553e076a9a)中包含的UsingBingMaps示例以使用MVVM-Light工具包。我试图使用EventToCommand设置一个命令到Pushpin的MouseLeftButtonUp事件,但是命令没有得到执行。以下是图钉的代码:图钉与EventToCommand
<my:Pushpin Style="{StaticResource PushpinStyle}"
Location="{Binding Location}"
Background="{Binding TypeName, Converter={StaticResource PushpinTypeBrushConverter}}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<cmd:EventToCommand Command="{Binding DataContext.PushpinClickCommand, ElementName=HomePage}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<Image Source="{Binding Icon}" />
</my:Pushpin>
我是否缺少任何东西?有人能够使用Pushpin对象的EventToCommand吗?