I'm presenting a set of records in a WPF xaml listview with datagridview cells:
New-Window -Title 'Select Group' -WindowStartupLocation CenterScreen -Width 700 -Height 500 -DataContext $DeviceCollections -Content {
New-ListView -Margin 5 -DataBinding @{ ItemsSource = New-Binding } -View { New-GridView -Columns {
New-GridViewColumn Name
New-GridViewColumn MemberClassName
New-GridViewColumn CollectionID
New-GridViewColumn Comment
New-GridViewColumn CurrentStatus
}
}
} -On_MouseDoubleClick {
Global:Get-Selection $window
} -Show
I added the On_MouseDoubleClick to hook up my get-selection function for the presented window.
The problem is I don't know how to determine the clicked ROW or cell to get that content to be able to process it in the remainder of my Powershell 4 script.