RibbonComponent 介面

定義

包含方法和成員,可與 Visual Studio 通訊、瀏覽您應用程式的控制項階層架構,和最佳化控制項的執行階段配置。

public interface class RibbonComponent : IDisposable, System::ComponentModel::IComponent
[System.Runtime.InteropServices.Guid("09b06894-74de-44ff-9d48-9661ae639f41")]
public interface RibbonComponent : IDisposable, System.ComponentModel.IComponent
[<System.Runtime.InteropServices.Guid("09b06894-74de-44ff-9d48-9661ae639f41")>]
type RibbonComponent = interface
    interface IComponent
    interface IDisposable
Public Interface RibbonComponent
Implements IComponent, IDisposable
衍生
屬性
實作

備註

此介面的某些成員只能在功能區載入 Office 應用程式之前設定,或在運行時間將控件新增至動態功能表之前設定。 如需設定這些屬性的詳細資訊,請參閱 功能區物件模型概觀

注意

這個介面是由 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

屬性

Name

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

Parent

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

Ribbon

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

RibbonUI

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

Tag

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

方法

PerformDynamicLayout()

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

PerformLayout()

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

ResumeLayout()

回復 SuspendLayout() 方法的效果。

ResumeLayout(Boolean)

回復 SuspendLayout() 方法的效果。

SuspendLayout()

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

適用於