Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alex Gill 26 posts 61 karma points
    Sep 30, 2014 @ 10:38
    Alex Gill
    0

    Actions - obsolete?

    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 an IAction names that parameter "legacyMenu":

    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?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies