共用方式為


RibbonBase.Context Property

Gets the Inspector window, or the Explorer window in Outlook, that is associated with this Ribbon.

Namespace:  Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common.v4.0.Utilities (in Microsoft.Office.Tools.Common.v4.0.Utilities.dll)

Syntax

'Declaration
Public ReadOnly Property Context As Object
public Object Context { get; }

Property Value

Type: System.Object
An Object that represents the Inspector window or Explorer window that is associated with this RibbonBase object.

Remarks

In Outlook, this property refers to the Inspector window or Explorer window in which this RibbonBase is displayed.

In all other Office projects, this property returns null.

.NET Framework Security

See Also

Reference

RibbonBase Class

Microsoft.Office.Tools.Ribbon Namespace