RibbonMenu.Items Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the collection of controls that are on the menu.
public:
property System::Collections::Generic::IList<Microsoft::Office::Tools::Ribbon::RibbonControl ^> ^ Items { System::Collections::Generic::IList<Microsoft::Office::Tools::Ribbon::RibbonControl ^> ^ get(); };
public System.Collections.Generic.IList<Microsoft.Office.Tools.Ribbon.RibbonControl> Items { get; }
member this.Items : System.Collections.Generic.IList<Microsoft.Office.Tools.Ribbon.RibbonControl>
Public ReadOnly Property Items As IList(Of RibbonControl)
Property Value
The collection of controls that are on the menu.
Exceptions
You try to add, remove, or replace a RibbonControl to this collection after the Ribbon is loaded.
Remarks
To add a Ribbon control to a menu at run time, create an instance of the control, and then add the new control to the Items collection. If you want to do this after the Ribbon is loaded into the Office application, you must set the Dynamic property to true
. For more information, see Ribbon Object Model Overview.
When you add controls to a menu by using the Ribbon Designer, Visual Studio automatically adds the controls to the Items property of the menu.