I need to sync the column order of two ListViews event when the user changes the order. But it seems there is not a Column reorder event.
For the moment I just did a
I'm not sure it works, but you could probably take advantage of the fact that GridView.Columns
is an ObservableCollection
: you could subscribe to the CollectionChanged
event and handle the case where Action
= Move
GridView gridView = (GridView)listView.View;
gridView.Columns.CollectionChanged += gridView_CollectionChanged;
private void gridView_CollectionChanged(object sender, CollectionChangedEventArgs e)
{
if (e.Action == NotifyCollectionChangedAction.Move)
{
string msg = string.Format("Column moved from position {0} to position {1}", e.OldIndex, e.NewIndex);
MessageBox.Show(msg);
}
}