/// <summary> /// Creates a contextual menu and associates it to the left- or right-click command. Uses the <see cref="StandardCommandContextMenu"/>. /// To use your own menu, with custom data template and style, call the overload that takes a menu. /// </summary> /// <param name="mouseClickButton">Either <see cref="MouseButton.Left"/> or <see cref="MouseButton.Right"/>. The contextual menu will /// be associated with that button's click event.</param> /// <exception cref="ArgumentException">Raised if <paramref name="mouseClickButton"/> is neither <see cref="MouseButton.Left"/> nor <see cref="MouseButton.Right"/>.</exception> public ObservableHierarchicalCommandObject CreateHierarchicalMenu(MouseButton mouseClickButton) { ContextMenu menu; menu = new StandardCommandContextMenu(); return(CreateHierarchicalMenu(mouseClickButton, menu)); }
/// <summary> /// Creates a contextual menu and associates it to the left- or right-click command. Uses the <see cref="StandardCommandContextMenu"/>. /// To use your own menu, with custom data template and style, call the overload that takes a menu. /// </summary> /// <param name="mouseClickButton">Either <see cref="MouseButton.Left"/> or <see cref="MouseButton.Right"/>. The contextual menu will /// be associated with that button's click event.</param> /// <exception cref="ArgumentException">Raised if <paramref name="mouseClickButton"/> is neither <see cref="MouseButton.Left"/> nor <see cref="MouseButton.Right"/>.</exception> public ObservableHierarchicalCommandObject CreateHierarchicalMenu(MouseButton mouseClickButton) { ContextMenu menu; menu = new StandardCommandContextMenu(); return CreateHierarchicalMenu(mouseClickButton, menu); }