Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7540465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:39:02+00:00 2026-05-30T07:39:02+00:00

If I have a context menu, is it possible to join it to another

  • 0

If I have a context menu, is it possible to join it to another menu? So you get:

  Menu 1 Item 1
  Menu 1 Item 2
  Menu 1 Item N
    ---------
  Menu 2 Item 1
  Menu 2 Item 2
  Menu 2 Item N

Let’s take an example of a notepad-like program. There is repetition in the menus in that there is a standard set of tools that appear in both the edit menu and the edit controls context menu (the Cut, Copy, Paste, Select All…).

I’d like to have a menu called ClipboardTools, which will appear in both the Edit and control context menus, without needing to create the items more than once. Of course in this case the repetition isn’t that bad, but I have to deal with larger menus that appear in 3-4 different menus, and ideally not as sub menus.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:39:04+00:00Added an answer on May 30, 2026 at 7:39 am

    Yes. Since each menuItem is a separate control, you can add the same menuItem to both menu;

      var joinedMenuItem = new System.Windows.Forms.ToolStripMenuItem();
      menu1.Items.Add(joinedMenuItem );
      menu2.Items.Add(joinedMenuItem );
    

    The same way you may add items from one menu to other menu;

      menu1.Items.AddRange(menu2.Items);
    

    That is time to say that:
    ToolStripMenu sub-items are it Items property.
    ToolStripMenuItem sub-items are in DropDownItems property.

    So if you have two top menu-items (like File and Edit) and you want to remove shared subitems:

      foreach (var item in topMenuItem2.DropDownItems)
      {
          topMenuItem1.DropDownItems.Remove(item);
      }
    

    In the real life, if one want such flexible menu system, most probable one would create total list of menu items. And maybe subsets of menu Items by categories. Then one would add menu-items from such list or sets to the displayed menu.

    As example, you can provide possibility for users to customize the menu or create their own custom menu sections. As it is done in Visual Studio.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have the context menu of links provide me an option to
so I have attached a context menu (right-click menu) to a wpf listview. unfortunately,
I have a ViewModel (AbstractContextMenu) that represents my context menu (IContextMenu), and I bind
I have a listview with two columns and I'm using a context menu to
I have a list view filled with data. I set up a context menu
I've defined a custom content type - news. I also have a menu item
Is it possible to create a dynamic context menu in android? What I mean
I have an application which runs using the context menu of windows explorer. I
Is it possible to use JavaScript to trigger a Flash object's context-menu 'Print' action?
I'm trying to get my application to display a popup context menu when a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.