Below are the steps to dynamically clone a menu in .NET:
• Create an alternate MainMenu object.
• Clone the first menu with the CloneMenu method.
• Create additional menu items related to the application state.
• Then add the new menu items to the MenuItems collection of the top-level menu item cloned. This can be done by using the Add method to specify their order within the collection by their index.
• Then assign the newly created MainMenu object to the form.
Asked In: Many Interviews |