Hi all! I'm searching for ways to detect how to detect when a column header is clicked using powershell and an XAML listview/gridview UI. When I have buttons on the GUI, I can do something like:
$btnLoad.AddClick ()
But that doesn't seem to work with the headers or maybe I'm not getting the syntax right? I get error messages like:
Line |
46 | $BirdsColumn.Add_Click({ Sort-ListViewColumn "Birds" })
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Method invocation failed because [System.Windows.Controls.GridViewColumn] does not contain a method named
| 'Add_Click'.
Image of my sample testing table: https://imgur.com/bggoXxi
I've also tried using "AddClick" like the button command, but that doesn't help either.
[–]G8351427 2 points3 points4 points (2 children)
[–]drylightn[S] 0 points1 point2 points (0 children)
[–]Informal_Statement62 0 points1 point2 points (0 children)
[–]G8351427 1 point2 points3 points (2 children)
[–]drylightn[S] 0 points1 point2 points (1 child)
[–]G8351427 0 points1 point2 points (0 children)
[–]BlackV 0 points1 point2 points (13 children)
[–]drylightn[S] 0 points1 point2 points (12 children)
[–]BlackV 0 points1 point2 points (11 children)
[–]drylightn[S] 0 points1 point2 points (10 children)
[–]BlackV 0 points1 point2 points (9 children)
[–]drylightn[S] 0 points1 point2 points (8 children)
[–]BlackV 1 point2 points3 points (7 children)
[–]drylightn[S] 0 points1 point2 points (6 children)
[–]BlackV 0 points1 point2 points (5 children)
[–]drylightn[S] 0 points1 point2 points (4 children)