I have a TreeView that allows for multiple selection of TreeViewItem's. We don't use RadTreeView/Item, the project uses ArtOfTest.WebAii.Controls.Xaml.Wpf.TreeView/Item controls.
My issue is, I have a screen that when it loads, the same TreeViewItem isn't necessarily selected, and I need to select a specific one based on some text in the name of it.
So for example, in Screenshot_1, that first item is selected but I actually need the second one selected (there could be more than two items, that is just currently what I have in my sample), but the first item might not always be selected. There could be nothing selected on the screen load.
What I was thinking I would like to do is loop through the TreeView and deselect everything that is expanded, unless it has the text I'm looking for, in which case it should expand/select it.
Been working on this for a while and can't seem to figure it out...