If you're interested to see how to attach commands to listview items for use with an implementation of the MVVM pattern, have a look at this.

 

<Style x:Key="Local_OpenEntityStyle"
           TargetType="{x:Type ListViewItem}">
        <Setter Property="acb:CommandBehavior.Event"
                        Value="MouseDoubleClick" />
        <Setter Property="acb:CommandBehavior.Command"
                        Value="{Binding ElementName=uiEntityListDisplay, Path=DataContext.OpenEntityCommand}" />
        <Setter Property="acb:CommandBehavior.CommandParameter"
                        Value="{Binding}" />
</Style>

 

Here the command to be fired on the MouseDoubleClick event is set, the CommandParameter, will be the data object that we click on.

About Brian Keating
Brian Keating
Professional Software Developer, .NET / C++ / Java View all posts by Brian Keating →