OfficeRibbon 介面

定義

表示在 Visual Studio 的 Office 專案中使用 Ribbon Designer 建立的 Microsoft Office Ribbon 自訂。

public interface class OfficeRibbon : IDisposable, Microsoft::Office::Tools::Ribbon::RibbonComponent, System::ComponentModel::IComponent
[System.Runtime.InteropServices.Guid("49fbf223-6d24-4c4b-9101-2d5833434328")]
public interface OfficeRibbon : IDisposable, Microsoft.Office.Tools.Ribbon.RibbonComponent, System.ComponentModel.IComponent
[<System.Runtime.InteropServices.Guid("49fbf223-6d24-4c4b-9101-2d5833434328")>]
type OfficeRibbon = interface
    interface RibbonComponent
    interface IComponent
    interface IDisposable
Public Interface OfficeRibbon
Implements IComponent, IDisposable, RibbonComponent
屬性
實作

備註

您通常不會直接使用 OfficeRibbon 介面。 請改用 Visual Studio 在專案中新增功能區 (Visual Designer) 專案時所產生的功能區類別。 您可以使用所產生功能區類別中的事件和屬性來完成與功能區相關的大部分工作。

產生的 Ribbon 類別繼承自 RibbonBase 類別。 這個基類會將其成員的所有呼叫重新導向至 Visual Studio Tools for Office 運行時間介面的內部實作OfficeRibbon。 如果您想要直接使用 OfficeRibbon 物件,請使用 Base 所產生功能區類別的屬性。

注意

這個介面是由 Visual Studio Tools for Office Runtime 實作, 並不能實作於您的程式碼中。 如需詳細資訊,請參閱 Visual Studio Tools for Office Runtime Overview

使用方式

本文件說明此類型的版本,其會用在目標為 .NET Framework 4 或更新版本的 Office 專案中。 在以 .NET Framework 3.5 為目標的專案中,此類型可能會有不同的成員,而為此類型提供的程式碼範例可能無法運作。 如需此類型在以 .NET Framework 3.5 為目標專案中的相關文件,請參閱下列 Visual Studio 2008 文件中的參考章節:http://go.microsoft.com/fwlink/?LinkId=160658

屬性

Context

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

DefaultExtension

取得這個 OfficeRibbon 物件的預設延伸模組。

Extension

取得這個 OfficeRibbon 物件的自訂副檔名。

Global

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

Name

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

(繼承來源 RibbonComponent)
OfficeMenu

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

Parent

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

(繼承來源 RibbonComponent)
Ribbon

取得包含控制項階層的最上層 Ribbon 物件。

(繼承來源 RibbonComponent)
RibbonId

取得已用於建立這個 OfficeRibbon 物件執行個體的功能區 ID。

RibbonType

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

RibbonUI

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

(繼承來源 RibbonComponent)
StartFromScratch

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

Tabs

取得 RibbonTab 中的 RibbonOfficeMenu 物件集合。

Tag

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

(繼承來源 RibbonComponent)

方法

PerformDynamicLayout()

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

(繼承來源 RibbonComponent)
PerformLayout()

如果 具有父代,而且未暫止配置,請呼叫 RibbonComponentMicrosoft.Office.Core.IRibbonUI.InvalidateControl。

(繼承來源 RibbonComponent)
ResumeLayout()

回復 SuspendLayout() 方法的效果。

(繼承來源 RibbonComponent)
ResumeLayout(Boolean)

回復 SuspendLayout() 方法的效果。

(繼承來源 RibbonComponent)
SuspendLayout()

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

(繼承來源 RibbonComponent)

事件

Close

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

Load

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

LoadImage

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

適用於