Hey all,
Fairly new to using certain aspects of UIElements and had a question. I have a block of code, which on init creates a manipulator for a contextual menu
private IManipulator CreateMoveSubgroupContextualMenu()
{
ContextualMenuManipulator contextualMenuManipulator = new ContextualMenuManipulator(
menuEvent =>
menuEvent.menu.AppendAction("Move Selection To Subgraph/Root", actionEvent => MoveCurrentSelectionToSubgraph(0))
);
moveSubgraphMenu = contextualMenuManipulator;
return contextualMenuManipulator;
}
Now this list needs to be dynamically updated based on the current amount of subgraphs, so whenever a subgraph is added I am looking to call AppendAction to the DropdownMenu. I’m basically just looking to call the same AppendAction method as called in the constructor, but I cannot for the life of me figure out how to do this after storing the ContextualMenuManipulator. Any insight/help greatly appreciated