RibbonBase 類別

定義

做為 Microsoft Office 功能區自訂的基底類別 (Base Class)。

public ref class RibbonBase abstract : System::ComponentModel::Component, IDisposable, Microsoft::Office::Tools::Ribbon::IRibbonExtension
[System.ComponentModel.ToolboxItem(false)]
public abstract class RibbonBase : System.ComponentModel.Component, IDisposable, Microsoft.Office.Tools.Ribbon.IRibbonExtension
[<System.ComponentModel.ToolboxItem(false)>]
type RibbonBase = class
    inherit Component
    interface IRibbonExtension
    interface IExtension
    interface IDisposable
Public MustInherit Class RibbonBase
Inherits Component
Implements IDisposable, IRibbonExtension
繼承
RibbonBase
屬性
實作

備註

當您將新的功能區 (Visual Designer) 專案新增至 Office 專案時,Visual Studio 會將繼承自 RibbonBase 的功能區類別新增至專案。 RibbonBase 包含所有功能區類別通用的方法和屬性。 如需詳細資訊,請參閱 Ribbon Designer

某些屬性 RibbonBase 只能在功能區載入 Office 應用程式之前設定。 如需設定這些屬性的詳細資訊,請參閱 功能區物件模型概觀

使用方式

此類型只會在目標為 .NET Framework 4 或更新版本的 Office 專案中使用。 定義這個類型的組件並非 Visual Studio Tools for Office Runtime 的一部分。 您必須將這個組件與您的方案一起部署。 如需詳細資訊,請參閱 Visual Studio Tools for Office Runtime 的組件

建構函式

RibbonBase(RibbonFactory)

初始化 RibbonBase 類別的新執行個體。

屬性

Base

取得這個 RibbonBase 物件擴充的 RibbonBase 物件。

Context

取得 Outlook 中與這個功能區相關聯的 [偵測器] 視窗或 [總管] 視窗。

Factory

取得或設定與這個 RibbonBase 關聯的功能區 Factory。

Global

取得或設定值,這個值會判斷此 RibbonBase 是否可以同時在多個內容中使用。

Name

取得或設定這個 RibbonBase 的名稱。

OfficeMenu

取得 RibbonOfficeMenu,表示 Microsoft Office 功能表自訂。

Parent

取得 RibbonComponent,表示這個 RibbonComponentRibbonBase 的父代。

RibbonId

取得已用於建立這個 RibbonBase 類別執行個體的功能區 ID。

RibbonType

取得與這個 RibbonBase 執行個體關聯之功能區 ID 的逗號分隔清單。

RibbonUI

取得 Microsoft Office 應用程式提供給功能區擴充性程式碼的 IRibbonUI 執行個體。

StartFromScratch

取得或設定值,這個值表示是否要隱藏功能區上的所有內建索引標籤以及 Microsoft Office 功能表上的大部分命令,並且只顯示此功能區項目內定義的自訂。

Tabs

取得 RibbonTab 中的 RibbonOfficeMenu 物件集合。

Tag

取得或設定與這個 RibbonBase 關聯的應用程式特定資料。

方法

Dispose(Boolean)

釋放 RibbonBase 類別所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。

PerformDynamicLayout()

如果 RibbonBaseRibbonComponent 具有動態功能表這類動態父代,而且未暫止配置,請呼叫父控制項的 Microsoft.Office.Core.IRibbonUI.InvalidateControl 方法。

PerformLayout()

重新整理功能區使用者介面。

ResumeLayout()

回復 SuspendLayout() 方法的效果。

ResumeLayout(Boolean)

回復 SuspendLayout() 方法的效果。

SuspendLayout()

防止 Microsoft Office 應用程式重新整理功能區上控制項的狀態。

事件

Close

會在關閉這個 RibbonBase 執行個體時發生。

Load

會在 RibbonBase 載入至 Microsoft Office 應用程式時發生。

LoadImage

RibbonBase 載入時發生 (如果已設定一或多個控制項的 ImageName 屬性)。

明確介面實作

IExtension.ExtensionBase

做為 Microsoft Office 功能區自訂的基底類別 (Base Class)。

適用於