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
90
XamDataTree and Zoom
posted

Hi,

XamDataGird has very nice Zoom option when you hold Ctrl and use scroll wheel.
It looks like XamDataTree lacks this functionality.
If it lacks zoom them maybe someone has any idea how easily we can implement this?

And one more think. XamDataTree seems to also lack of expand all keyboard shortcut - "*".
Is it true or maybe it exists but is different one.

Regards,
Jarek

Parents
  • 34810
    Verified Answer
    Offline posted

    Hello Jarek,

    I am unsure of the functionality that you are referring to in which the XamDataGrid is able to zoom and expand all records on press of the "*" key as a shortcut, but these are not built-in features of the XamDataGrid or the XamDataTree. Perhaps I am misunderstanding your usage of the word "Zoom" in this case for a different type of functionality?

    In order to actually implement this behavior, you may be able to employ the use of a ScaleTransform for the XamDataTree in order to zoom it. You can read about using the ScaleTransform with different WPF controls here: https://www.codeproject.com/Tips/860914/Add-Zooming-to-a-WPF-Window-or-User-Control.

    Regarding the expand-all keyboard shortcut, you could handle the KeyDown or PreviewKeyDown event on the XamDataTree for this and check the event arguments for the keyboard shortcut of your choosing to expand all of the nodes. If you loop through the XamDataTree.Nodes collection, you can obtain each XamDataTreeNode and set its IsExpanded property to true. Note, each XamDataTreeNode has a Nodes collection of its own that will return the child nodes for that particular node, and you can mark their IsExpanded properties true as well.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

Reply Children
No Data