IRibbonControl.Tag Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Used to store arbitrary strings and fetch them at runtime. Read-only
public:
property System::String ^ Tag { System::String ^ get(); };
public string Tag { get; }
member this.Tag : string
Public ReadOnly Property Tag As String
Property Value
String
Examples
In the XML used to customize the Ribbon user interface, you can set a tag as follows. When the MyFunction action is called, you can read the Tag property, which will be equal to “some string”.
<span class="label"><button id=”mybutton” tag=”some string” onAction=”MyFunction”/></span>
Remarks
Normally you can distinguish between controls in a Ribbon user interface XML customization file using the Id property. However, there are restrictions on what IDs can contain (no non-alphanumeric characters, and they must all be unique).
The Tag property doesn’t have these restrictions and so it can be used in the following situations, where ID doesn’t work:
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for