我不知道如何在Windows Phone 8的xaml中使用触发器。
但我看到有些人这样做,如下所示:
<toolkit:ListPicker Header="Background"
ExpansionMode="FullscreenOnly"
Template="{StaticResource ListPickerControlTemplate}"
VerticalAlignment="Top"
ItemsSource="{Binding Path=Buildings.ObjectList}"
Margin="0"
x:Name="buldings"
Padding="0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding Path=BuildingSelectionCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=buldings}" />
</i:EventTrigger>
</i:Interaction.Triggers>
但我没有 System.Windows.Interactivity。 而且我没能通过Nuget找到兼容的包。
感谢您的耐心等待。
最佳答案
Right click on References -> Add Reference.. -> Extensions -> Select System.Windows.Interactivity
程序集位于此处:
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Windows Phone\v8.0\Libraries\
关于xaml - Windows 手机 : no trigger in xaml?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17962346/