Search code examples
xamldata-bindingblendcommandbinding

Use <Interaction.Behaviors> and <EventTriggerBehavior> in UWP 10 app


How can I use <Interaction.Behaviors> and <EventTriggerBehavior> in a Windows 10 universal app? I will get something like this with Blend:

Source both images above: Jef Daels 2015

In may (bad) documentation, I've read that it must be something over here:

And here is the code for what I need to do it:

<ListBox Grid.Row="2" Grid.Column="0"  Grid.ColumnSpan="3"
         ItemContainerStyle="{StaticResource lstidflt}" SelectedItem="{Binding SelectedVillage, Mode=TwoWay}"
         ItemTemplate="{StaticResource weatheritemdt}" ItemsSource="{Binding VillageList}" >
</ListBox>

Solution

  • I've found it. I must install the 'behaviors' package from Nuget and than drag and drop it onto the element I need to use it. Thanks to ChrisW.!