RibbonComboBox.SelectionBoxWidth Property

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the width of the text box that displays the selected item in the combo box.

Namespace:   System.Windows.Controls.Ribbon
Assembly:  System.Windows.Controls.Ribbon (in System.Windows.Controls.Ribbon.dll)

public double SelectionBoxWidth { get; set; }

Property Value

Type: System.Double

The width of the text box that displays the selected item in the combo box. The registered default is 0.0. For more information about what can influence the value, see Dependency Property Value Precedence.

The SelectionBoxWidth property does not include the widths of the image and label that are associated with the combo box.

Identifier field

SelectionBoxWidthProperty

Metadata properties set to true

None

The following example shows the markup to create a combo box with three available items.

<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
Available since 4.5
Return to top
Show: