Partilhar via


RibbonControlEventArgs.Control Property

Gets the control for which the event was raised.

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

Syntax

'Declaration
ReadOnly Property Control As IRibbonControl
IRibbonControl Control { get; }

Property Value

Type: Microsoft.Office.Core.IRibbonControl
The control for which the event was raised.

Remarks

The Control property gives a reference to the window context where an event is raised. It also provides the ID of the custom control that raised the event.

The Tag property of the Control is used internally. It contains the Ribbon ID, not the value of the Tag property of the control.

.NET Framework Security

See Also

Reference

RibbonControlEventArgs Interface

Microsoft.Office.Tools.Ribbon Namespace