Hello,
I'd like to know when the user resizes a column on a XamDataGrid. I've tried events LayoutUpdated, and SizeChanged. I also wanted to try ManipulationCompleted, but it is not an available event even though my XamDataGrid documentation lists it. To me, these looked like the relevant events. Nothing else jumps out.
How can I be notified when the user resizes a column?
Thanks,Dave
Hi,
I need to handle both events but now i'm able to handle it correctly.
Thx for reply.
Hello Anderuso,
Instead of handling the LabelPresenter’s SizeChanged event, you can handle the Header Presenter one.
Hope this helps you.
Your sample working fine, but sometimes this event is fired when user uses horizontal scroll bar. I modified your sample to demonstrate the problem - run modified example, resize column "F25", display first column and last column using horizontal scroll bar. You will notice several invocations of SizeChanged event.
I need to react only when user actually changed width of column. Is this possible?
Hello Dave,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and I created a sample project for you with functionality you want. Basically I handled the LabelPresenter’s SizeChanged event using EventSetter in and write a line in the Output.
Feel free to write me if you have further questions.