Link to home
Create AccountLog 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
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
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 ?