I am trying to use a TreeView to show data read from a webservice. However, I have a special requirement. Normally the presence of the ExpandCollapseIndicator is determined by the return value of CanExecute function of the LoadOnDemandCommand. A custom item template would include the ExpandCollapseIndicator and bind its IsLoadOnDemandEnabledProperty to TreeViewDataItem.IsLoadOnDemandEnabled. This works fine if the ability to expand/collapse remains constant. I need the ability to change the value of TreeViewDataItem.IsLoadOnDemandEnabled AFTER the tree node has been initialized. Normally, I would just do OnPropertyChanged(nameof(IsLoadOnDemandEnabled)) but I do not have access to that since TreeViewDataItem is a wrapper around my own data model class. I do not have access to TreeViewDataItem.
So how can I force an update to the ExpandCollapseIndicator AFTER the tree node has been initialized as my CanExecute function of LoadOnDemandCommand will now return a different value?