Treeview in Grid for WPF - Community Credit Forums
in

    Community Credit Forums

Treeview in Grid for WPF

Last post Tue, May 27 2008 12:01 AM by Happyarimaan. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • Mon, May 26 2008 7:57 AM

    Treeview in Grid for WPF

    Iam trying to develop a TreeView where the user can view the nodes singularly eg. if in a list he clicks on a particular node(Node 1), then only its childnodes shall be visible, the moment he clicks on another node(Node 2), that node's(Node 2's) childnodes would be visible, while the earlier node's(Node 1) childnodes would collapse automatically. My Questions are  :

    i) Is it possible to do so by only using XAML(no code in VB to be written) ?

    ii) If possible could you refer any articles/manuals/guidelines on the subject.

    Regards ......... Happyarimaan

    Be who you are and say what you feel, because those who mind don't matter
    and those who matter don't mind.
    Filed under: ,
  • Mon, May 26 2008 9:40 AM In reply to

    Re: Treeview in Grid for WPF

    Go have a look at this article:  http://www.codeproject.com/KB/WPF/TreeViewWithViewModel.aspx

    You can use the techniques here to accomplish what you need.

    I'm assuming that you want to allow the user to drill down in the treeview and only close the others when a new root node is clicked, right?

    You could also put multiple treeviews inside a ListBox and when the ListBoxItem is selected, show the treeview for that item.

     A ListBox can have a different ItemsTemplate for selected and not selected items.

    Many choices here.

    Cheers,

    Karl

    Code Project MVP, Karl's Blog : Get Mole v4 Here also!

    Just a grain of sand on the worlds beaches.
  • Tue, May 27 2008 12:01 AM In reply to

    Re: Treeview in Grid for WPF

    Thanks Karl I am going through the article. Suppose I could do the entire thing using ToolBar and Buttons, coding only in XAML. The properties will be similar i.e.  childnodes of only one button shall be viewable once at a time.

    You have any resources for it ! It will be of immense help.

    Regards ......... Happyarimaan

    Be who you are and say what you feel, because those who mind don't matter
    and those who matter don't mind.
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems