Link to home
Start Free TrialLog in
Avatar of deeMvee
deeMveeFlag for Norway

asked on

programmatically select and expand treeviewItem when bound to a collection

I have a treeview which is bound to an observable collection.
After I insert an element in the collection it appears in my treeview.
Since the collection is of base type INotifyPropertyChanged the treeview methods are no longer available.
I want to be able to set "IsSelected" from code behind.
What is the best way to do this?
ASKER CERTIFIED SOLUTION
Avatar of incerc
incerc
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of deeMvee

ASKER

Hi, and thanks for your reply,

It look like the setter binding is only supported in WPF... And did not mention that I used SL4 in the above question. This method would do what I wanted. I looked at some other posts with work around but they seem very complicated...

Do you have any other sources of help that could tell me how ?