listbox或datagrid内容双击事件绑定
====listbox===
<DataTemplate>
                        <Border Width="350"
                                Height="230"
                                Margin="2"
                                Background="{DynamicResource Common.UC.Background.Dark}">
                            <Border.InputBindings>//绑定事件
                                <MouseBinding Command="{Binding DetailShowCommand}" MouseAction="LeftDoubleClick" />
                            </Border.InputBindings>
===datagrid====
 <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseDoubleClick">
                        <i:InvokeCommandAction Command="{Binding DoubleClickCommand}" CommandParameter="{Binding ElementName=dgvDeploys, Path=SelectedItem}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
posted on 2018-07-04 17:03 Shine-Zhong 阅读(185) 评论(0) 收藏 举报
 
                    
                     
                    
                 
                    
                 
                
            
         
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号