码迷,mamicode.com
首页 > Windows程序 > 详细

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

时间:2015-07-15 18:45:14      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:

<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>

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

标签:

原文地址:http://www.cnblogs.com/pengde/p/4648961.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!