I want to determine when the user clicks on an item in the list, without using events, as I am binding the command and I don’t like all the stupid behavior. I tried this:
<ListView x:Name="MainList" Margin="2,8,6,8" Background="Black"
ItemsSource="{Binding Path=AssetsVM.Data, Mode=OneWay}"
BorderBrush="{x:Null}" >
<ListView.InputBindings>
<MouseBinding Command="{Binding Path=AssetsVM.SelectActivo}"
CommandParameter="{Binding ElementName=MainList, Path=SelectedItem}"
MouseAction="LeftClick" />
</ListView.InputBindings>
This works fine if I click on a list but does not work on items. I need either a way to enable Preview, or MouseAction / Gesture, which behaves like a preview. Is one of them possible?
source
share