I am working on a WPF application. It contains a multi select tree view. The tree is supposed to have different context menu items for each node(i.e at each level of the tree). I am able to populate the tree and even get the context menu to have different options based on the type of data in the tree view. Once i have done this, the command bindings to the context menu items has stopped working. i get an error in the output window as below:
System.Windows.Data Error: 40 : BindingExpression path error: 'RefreshEvent' property not found on 'object' ''RootNameList' (HashCode=49313939)'. BindingExpression:Path=RefreshEvent; DataItem='RootNameList' (HashCode=49313939); target element is 'MenuItem' (Name=''); target property is 'Command' (type 'ICommand')
As it is visible in the error, the DataItem is not pointing to the intended ViewModel. Can anyone help me to resolve this issue.
I have attached the code as an attachment.7588-treeview.xml