How can I get the headerclick event of a WPF Listview?
+3
A:
You can use the GridViewColumnHeader.Click attached event. As an example, see the MSDN page on sorting a GridView when the header is clicked.
<ListView x:Name='lv'
Height="150"
HorizontalAlignment="Center"
VerticalAlignment="Center"
GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler">
Matt Hamilton
2009-05-22 04:12:47
Thanks. This solved my problem.
Sauron
2009-05-22 04:19:08
Is it a secret code? The property is not listed.
Sauron
2009-05-22 04:29:07
Events that apply to children like that won't show up in Intellisense - the editor can't know which ones you might want to use!
Matt Hamilton
2009-05-22 04:36:01