Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am following this tutorial on how to create a custom section, and have got to the implementation of GetMenuForNode().
GetMenuForNode()
The author demonstrates implementing the menu using an IAction implementation.
IAction
However, MenuItem has several different constructors. The one that accepts an IAction names that parameter "legacyMenu":
MenuItem
public MenuItem(IAction legacyMenu, string name = "") : this() { this.Name = StringExtensions.IsNullOrWhiteSpace(name) ? legacyMenu.Alias : name; this.Alias = legacyMenu.Alias; this.SeperatorBefore = false; this.Icon = legacyMenu.Icon; this.Action = legacyMenu; }
The word "legacy" set alarm bells off in my head - is this approach to constructing a MenuItem now obsolete? What is the alternative?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Actions: legacy?
I am following this tutorial on how to create a custom section, and have got to the implementation of
GetMenuForNode()
.The author demonstrates implementing the menu using an
IAction
implementation.However,
MenuItem
has several different constructors. The one that accepts anIAction
names that parameter "legacyMenu":The word "legacy" set alarm bells off in my head - is this approach to constructing a MenuItem now obsolete? What is the alternative?
is working on a reply...