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
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per