How to bind to WPF DataGridColumn in MVVM from ContextMenu?
问题 I have a DataGrid with different Columns (TextBox, Combobox, DataPicker, etc.) displaying Data via MVVM. Now I want to have ContextMenu on each ColumnHeader to Group by the selected column, but I can't access the Binding Source (Binding Path) of the Column to tell ViewModell which column it has to Group. When I open the context menu for the first time it works fine, but when I open the context menu once again, it still passes the SortMemberPath from the first time. What am I doing wrong? XAML