How do I use a DelegateCommand
in a TreeView
to get the Expanded
event?
Should I be using the DelegateCommand
or is there another way?
Thanks
How do I use a DelegateCommand
in a TreeView
to get the Expanded
event?
Should I be using the DelegateCommand
or is there another way?
Thanks
Copyright © 2021 Jogjafile Inc.
Since you are mentioning Prism, I assume you have a controller or ViewModel attached to the view containing your TreeView...
That being the case, expose a boolean property IsExpanded
Now to hook this property up to the TreeView, you need to apply the following style in the TreeView's resources (or further up the Visual tree as appropriate)
NB: You can also use a similar technique to hook up the IsSelected property - also very useful!!