Hi,
Is it possible for the nodes of a XamDataTree be resized via mouse dragging the border of them, so that they can contain undetermine-sized controls or data templates?
Thank you.
Hello Anakin,
Thank you for post. I have been looking into your requirement and I can suggest using an ItemTemplate and implement the node resizing using PreviewMouseLeftButtonDown, PreviewMouseLeftButtonUp and PreviewMouseMove events. You can add a rectangle at the most right side of the DataTemplate and handle the mentioned events for that Rectangle. In the PreviewMouseLeftButtonDown you can use the CaptureMouse event for the sender to, force the PreviewMouseMove event to fire event when the mouse is not on the Rectangle and in the PreviewMouseMove event you can calculate the new size of the node and set it. I have created a sample application for you, that shows how you can implement this approach.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Thank you, Krasimir.
This sample is perfect. And I extended it to allow resizing SN and NWSE. Hope this could be a built-in feature of future versions.