HypernovaDesktop Components · docs
Binarymission
WPF › Ribbon › BinaryRibbonComboBoxItem

BinaryRibbonComboBoxItem

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.Office

An entry in a ribbon drop-down list, drawn in the ribbon's style with an optional small picture to the left of its text.

public class BinaryRibbonComboBoxItem : ComboBoxItem, IBinaryRibbonComponentCanDisplayImage

Inherits from / implements: ComboBoxItem, IBinaryRibbonComponentCanDisplayImage

Remarks

Use it in BinaryRibbonComboBox – which needs its entries to be items rather than plain data – and in BinaryRibbonFontFamilyComboBox, which makes one for each font. Put the text, or any other content, in ContentControl.Content and an optional picture in Image. The entry highlights with rounded corners under the pointer and is at least 20 units tall.

Examples

<ribbon:BinaryRibbonComboBox TitleText="View" ContentWidth="120" SelectedIndex="0"
        xmlns:ribbon="clr-namespace:Binarymission.WPF.Controls.Office;assembly=Binarymission.WPF.Controls.BinaryRibbon">
    <ribbon:BinaryRibbonComboBoxItem Content="All orders"      Image="Images/Orders16.png" />
    <ribbon:BinaryRibbonComboBoxItem Content="Awaiting payment" Image="Images/Clock16.png" />
    <ribbon:BinaryRibbonComboBoxItem Content="Shipped"         Image="Images/Truck16.png" />
</ribbon:BinaryRibbonComboBox>

See also

Members at a glance

Properties
ImageGets or sets the small picture drawn to the left of the entry's text.
Fields
ImagePropertyIdentifies the Image dependency property.

Properties

Image

public ImageSource Image

Gets or sets the small picture drawn to the left of the entry's text.

Value
The picture, drawn 16 x 16 device-independent units. The default is null.
Remarks

An entry with no picture leaves no gap for one, so its text starts at the left edge. In a list where only some entries have pictures, give the others a transparent picture to keep the text in one column.

Fields

ImageProperty static

public static readonly DependencyProperty ImageProperty

Identifies the Image dependency property.