Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
WPF XamDataGrid:当用户移动或调整列大小时会触发哪些事件?
我想知道用户是否做了这些事情,以便我可以保存列位置和宽度的详细信息。然后,当用户稍后打开网格时,我可以恢复他选择的列宽和相对位置。
XamDataGrid.FieldPositionChanged/Changing 会在字段移动时告诉您。然后,您使用事件 args 中 Field 的 ActualPosition 属性来获取其新位置。
我还没有找到宽度变化的公共事件,但是 Field.OnPropertyChanged("Width") 被触发了。