RibbonComboBox.SelectionBoxWidth 属性

获取或设置组合框中显示所选项的文本框的宽度。

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

语法

声明
Public Property SelectionBoxWidth As Double
    Get
    Set
public double SelectionBoxWidth { get; set; }
public:
property double SelectionBoxWidth {
    double get ();
    void set (double value);
}
member SelectionBoxWidth : float with get, set
function get SelectionBoxWidth () : double
function set SelectionBoxWidth (value : double)

属性值

类型:System.Double
组合框中显示所选项的文本框的宽度。注册的默认值为 0.0。有关可以影响值的因素的更多信息,请参见 依赖项属性值优先级

依赖项属性信息

标识符字段

SelectionBoxWidthProperty

设置为 true 的元数据属性

备注

SelectionBoxWidth 属性不包括与组合框相关联的图像和标签的宽度。

示例

以下示例显示创建组合框的标记,该组合框承载有三个可用项。

<ribbon:RibbonComboBox Label="1" 
                  SmallImageSource="Images/RightArrowShort_Green16.png"
                  SelectionBoxWidth="62"
                  VerticalAlignment="Center" 
                  IsEditable="True" >
    <ribbon:RibbonGallery SelectedValue="Green"
                          SelectedValuePath="Content"
                          MaxColumnCount="1">
        <ribbon:RibbonGalleryCategory>
            <ribbon:RibbonGalleryItem Content="Green" Foreground="Green" />
            <ribbon:RibbonGalleryItem Content="Blue" Foreground="Blue" />
            <ribbon:RibbonGalleryItem Content="Orange" Foreground="Orange" />
        </ribbon:RibbonGalleryCategory>
    </ribbon:RibbonGallery>
</ribbon:RibbonComboBox>

.NET Framework 安全性

请参见

参考

RibbonComboBox 类

Microsoft.Windows.Controls.Ribbon 命名空间