开发者

WPF XamDataGrid: What events fire when a user has moved or resized a column

开发者 https://www.devze.com 2023-02-04 13:38 出处:网络
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 col

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消