wpf ListBox 双击事件时在子项添加Style 确保选中

<ListBox ItemTemplate="{StaticResource CardPictureTemplate}" VirtualizingPanel.CacheLength="20,20" MinWidth="160" VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.CacheLengthUnit="Item" x:Name="listView" ItemsSource="{Binding CashRegistersShearch,IsAsync=True}" Style="{StaticResource template}" >
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="Grid_PreviewMouseLeftButtonDown"/>
</Style>
</ListBox.ItemContainerStyle>

上一篇:du -sh


下一篇:Java上等价类划分测试的实现