在UWP 10应用程序中使用<Interaction.Behaviors>和<EventTriggerBehavior>

H. *_*lyn 7 data-binding xaml blend commandbinding

如何使用<Interaction.Behaviors><EventTriggerBehavior>在Windows 10通用的应用程序?我会用Blend得到这样的东西:

上述两张图片:Jef Daels 2015

在may(bad)文档中,我已经读过它必须是这里的东西:

以下是我需要做的代码:

<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>
Run Code Online (Sandbox Code Playgroud)

H. *_*lyn 5

我找到了.我必须从Nuget安装'behavior'包,然后将它拖放到我需要使用它的元素上.感谢ChrisW.!