RibbonOfficeMenu.Items 属性

定义

获取添加到 Microsoft Office 菜单的功能区控件。

public:
 property System::Collections::Generic::IList<Microsoft::Office::Tools::Ribbon::RibbonControl ^> ^ Items { System::Collections::Generic::IList<Microsoft::Office::Tools::Ribbon::RibbonControl ^> ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Collections.Generic.IList<Microsoft.Office.Tools.Ribbon.RibbonControl> Items { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Items : System.Collections.Generic.IList<Microsoft.Office.Tools.Ribbon.RibbonControl>
Public ReadOnly Property Items As IList(Of RibbonControl)

属性值

在设计时或运行时添加到 Microsoft Office 菜单的功能区控件集合。

属性

例外

加载功能区后,尝试添加、移除或替换 RibbonControl

注解

可以在运行时添加控件,但只能在加载功能区之前添加控件。 创建控件的实例,然后将新控件添加到集合。Items 有关详细信息,请参阅 功能区对象模型概述

使用功能区Designer向 Microsoft Office 菜单添加控件时,Visual Studio 会自动将控件添加到 Items 属性。

适用于