WPF XamDataGrid: What events fire when a user has moved or resized a column
WPF XamDataGrid: What events fire when a user has moved or resized a column?
I would like to know if the user has done either of these things so that I can save details of the开发者_StackOverflow column positions and widths. Then, when the user opens the grid at a later point, I can restore his chosen column widths and relative positions.
XamDataGrid.FieldPositionChanged/Changing will tell you when a field moves. Then you use ActualPosition property of the Field from the event args to get its new position.
I haven't found a public event for the Width changing yet, but Field.OnPropertyChanged("Width") is fired.
精彩评论