RibbonComboBox.SelectionBoxWidth 属性

定义

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

public:
 property double SelectionBoxWidth { double get(); void set(double value); };
public double SelectionBoxWidth { get; set; }
member this.SelectionBoxWidth : double with get, set
Public Property SelectionBoxWidth As Double

属性值

Double

组合框中显示所选项的文本框的宽度。 注册的默认值为 0.0。 有关什么可以影响值的详细信息,请参阅 Dependency Property Value Precedence(依赖项属性值优先级)

示例

以下示例演示了用于创建包含三个可用项的组合框的标记。

<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>

注解

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

依赖项属性信息

标识符字段 SelectionBoxWidthProperty
元数据属性设置为 true

适用于