Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1640
drag-resizing nodes of XamDataTree
posted

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.

Parents
No Data
Reply
  • 30945
    Verified Answer
    Offline posted

    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

    NodeResizing.zip
Children