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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應