Share via


RibbonMenu Constructor (2007 System)

Initializes a new instance of the RibbonMenu class.

Namespace:  Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
Public Sub New
'Usage
Dim instance As New RibbonMenu()
public RibbonMenu()
public:
RibbonMenu()
public function RibbonMenu()

Remarks

Visual Studio Tools for Office creates an instance of the RibbonMenu class for you when you drag a Menu from the Office Ribbon Controls tab of the Toolbox onto the Ribbon Designer.

You can use this constructor to add a menu to the Microsoft Office Menu, a group, or to another control at run time. Create an instance of the RibbonMenu class, and then add the new RibbonMenu to the Items property of the Microsoft Office Menu, group, or control.

You can add a new RibbonMenu to the Microsoft Office Menu, a group, or to controls other than menus only before the Ribbon is loaded. For more information, see Ribbon Object Model Overview.

To add a RibbonMenu to another menu, you must set the Dynamic property of the parent menu to true. When the Dynamic property of the parent menu is true, you can add controls to the menu at any time during run time, even after the Ribbon is loaded.

.NET Framework Security

See Also

Reference

RibbonMenu Class

RibbonMenu Members

Microsoft.Office.Tools.Ribbon Namespace

Other Resources

Ribbon Object Model Overview