You can use a lambda expression to give you access to the CommandParameter
... try this:
AddItemToNodeCommand = new RelayCommand(parameter => AddItemToNode(parameter));
Please note that (as with all lambda expressions) the name parameter
here could be anything... this would work just the same:
AddItemToNodeCommand = new RelayCommand(p => AddItemToNode(p));
This is because we are simply setting the input parameter name for it before the =>
.
UPDATE >>>
Have you tried it like this?:
AddItemToNodeCommand = new RelayCommand<object>(parameter => AddItemToNode(parameter));
The last option is just to call it in the same way as you started with:
AddItemToNodeCommand = new RelayCommand(AddItemToNode);