RibbonTextBox.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 的元数据属性

备注

设置 IsLabelVisible 属性来控制标签的可见性。

示例

下面的示例演示如何设置 RibbonTextBox 上的 Label 属性。

<ribbon:RibbonTextBox Label="1" Text="Green"
                 Command="{Binding ColorCommand}"
                 SmallImageSource="Images/RightArrowShort_Green16.png" 
                 LargeImageSource="Images/RightArrowShort_Green32.png" 
                 KeyTip="C" />

.NET Framework 安全性

请参见

参考

RibbonTextBox 类

Microsoft.Windows.Controls.Ribbon 命名空间