Reputation: 55
I don't know how to use triggers in xaml of windows phone 8.
But I have seen some people do it, like below:
<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>
But I don't have System.Windows.Interactivity. And I failed to find a compatible package through Nuget.
Thanks for your patience.
Upvotes: 2
Views: 3153
Reputation: 6424
Right click on References -> Add Reference.. -> Extensions -> Select System.Windows.Interactivity
The assembly resides here:
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Windows Phone\v8.0\Libraries\
Upvotes: 3