Skip to content

SP5 A Reset() function for context menus would be a nice improvement #3224

@MCF

Description

@MCF

It would be nice if the IPlotMenu interface had a Reset() function that would reset the menu to its defaults. This would allow using the Add function to add to the defaults, then Reset to return back to the defaults.

Currently this functionality can be achieved in a slightly hacky way. For example, using the WPF plot control:

    MyPlot.Menu.Clear();

    ScottPlot.WPF.WpfPlotMenu menu = (ScottPlot.WPF.WpfPlotMenu) MyPlot.Menu;
    menu.ContextMenuItems.AddRange(menu.GetDefaultContextMenuItems());

    MyPlot.Menu.Add(...
    MyPlot.Menu.Add(...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions