> > >
Two-Way Bindable TreeView.SelectedItem Behavior
Express yourself! Share your work with other members of the Expression Community.

Each contribution is licensed to you under a License Agreement by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.

Two-Way Bindable TreeView.SelectedItem Behavior

Description
Discussions (1)

  • It's not solution
    1 Posts | Last Post March 02, 2011
    •  // check for top level item
       this.AssociatedObject.ExpandAll();
       this.AssociatedObject.UpdateLayout();
      
       are you sure that all containers will be loaded?
      Try your sample with this source
      
      treeNodes = new ObservableCollection<TreeNode>()
                  {
                      new TreeNode("First",
                          new TreeNode("Second"),
                          new TreeNode("Third"),
                          new TreeNode("Fourth", 
                              new TreeNode("9"),
                              ...
                              new TreeNode("16",
                                  new TreeNode("17"),
                                  ...
                                  new TreeNode("29",
                                      new TreeNode("30"),
                                      ...
                                      new TreeNode("36"))))
                              ),
                      new TreeNode("Fifth",
                          new TreeNode("Sixth"),
                          new TreeNode("Sevent"),
                          new TreeNode("Eight"))
                  }
      
      and try to select 34 node in first treeView

Details

Rate it: