Hi,
i have a tree. i am setting the itemsSource and i want to select the first item directly.
i tried after setting the itemssource. it's not working. if i add a button that selects the item its working fine.
tree.SelectItem(tree.Items[0]);
(tree.Items[0] is not null)
i also tried to go into a loop
While(tree.SelectedItem == null)
it 's not working. any suggestions plz
actually it turned out that i am using the windows tree (sorry for the confusion)
but anyway the problem was that when hidden, the tree does not set the selected item so i had to make it visible , set the selected item then make it hidden.
thanks
I was looking at the XamTree in 10.3 and there is no SelectItem method, unless it is something you've extended. Have you tried using the ActiveItem Property?
If you could give me more information about what you're trying to do I may be better able to help you.
Thanks,
Rich