TreeView Navigation Pane

Posted by: office on 14 January 2019, 7:51 am EST

    • Post Options:
    • Link

    Posted 14 January 2019, 7:51 am EST - Updated 4 October 2022, 12:08 am EST

    Hi all

    I’m moving a WinForms app over to WPF, and want to use a treeview as a navigation pane on the left, with a simple page containing input options on the right.

    Something like this (ignore the bread crumb, I won’t need that):

    It appears that there may be a lot of work to get the TreeView to trigger, but I’m new to WPF.

    Does anyone have a simple example of how to do this?

    Thanks

  • Posted 14 January 2019, 4:39 pm EST

    Hello,

    There are multiple ways of using C1TreeView. The way of using C1TreeView depends on how you want to show data.

    1. If you have some static data:* "

    "

    2. If you have dynamic data then you should set ItemsSource property of C1TreeView. Using this approach, you have to use C1HierarchicalDataTemplate

    In the attached sample C1TreeView is bound using ItemsSource property and data is being fetched from *.xml files. You can change the sample as per your needs

    Let us know, if you need anything.

    Thanks,

    Ruchir

    C1TreeView_Demo.zip

  • Posted 20 January 2019, 10:16 pm EST

    Hi Ruchir

    Apologies for the slow response, there was no email notification of a reply.

    The data will be static, so a simple XAML representation of the structure will work fine.

    Thanks for the code, that should give me a start to getting where I want.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels