Connect GridViewColumnHeader.Click event from ListView
Posted: 23 Apr 2020, 12:20
I have a ListView and I want to connect the event GridViewColumnHeader.Click to the function PersonListView_Click
How can I setup the ConnectEvent in order to recieve the click event when I click on the header/GridViewColumn of my ListView ?
Code: Select all
<ListView ItemsSource="{Binding Person}" GridViewColumnHeader.Click="PersonListView_Click">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Name}" />
Code: Select all
protected override bool ConnectEvent(object source, string eventName, string handlerName)
{
if (eventName == "Click" && handlerName == "PersonListView_Click")
{
Debug.Log(source);
ViewBase v = ((ListView)source).View;
// += this.PersonListView_Click;
return true;
}
return false;
}