RibbonButton.Label 属性

获取或设置控件旁边或控件下方显示的文本。

命名空间:  Microsoft.Windows.Controls.Ribbon
程序集:  RibbonControlsLibrary(在 RibbonControlsLibrary.dll 中)

语法

声明
Public Property Label As String
    Get
    Set
public string Label { get; set; }
public:
property String^ Label {
    String^ get ();
    void set (String^ value);
}
member Label : string with get, set
function get Label () : String
function set Label (value : String)

属性值

类型:System.String
控件旁边或控件下方显示的文本。注册的默认值为 nullnull 引用(在 Visual Basic 中为 Nothing)。有关可以影响值的因素的更多信息,请参见 依赖项属性值优先级

依赖项属性信息

标识符字段

LabelProperty

设置为 true 的元数据属性

备注

设置 ControlSizeDefinition 上的 IsLabelVisible 属性以控制标签的可见性。

示例

以下示例显示用于创建第一个按钮的标记。 Label 属性设置为“Paste”。

功能区按钮控件

功能区按钮控件

<ribbon:RibbonButton Label="Paste"
                Command="Paste"
                SmallImageSource="Images/Paste16.png" 
                LargeImageSource="Images/Paste32.png"
                KeyTip="V"
                ToolTip="Paste (Ctrl+V)"
                ToolTipDescription="Paste the contents of the Clipboard into the document." />

.NET Framework 安全性

请参见

参考

RibbonButton 类

Microsoft.Windows.Controls.Ribbon 命名空间