SelectionBoxItem Property

ComboBox.SelectionBoxItem Property


Gets the item that is displayed in the selection box.

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

public object SelectionBoxItem { get; private set; }

Property Value

Type: System.Object

The selected item.

The ControlTemplate of the ComboBox uses this property to show the selected item in the ComboBox. To get the selected item of the ComboBox outside of the ControlTemplate, use the Selector.SelectedItem property instead of this property.

<object property="{TemplateBinding SelectionBoxItem}"/>

Identifier field


Metadata properties set to true


The following example binds the Content property of a ContentPresenter to the SelectionBoxItem property. The ContentPresenter is part of the ControlTemplate for the ComboBox. For the complete sample, see Styling with ControlTemplates Sample.

.NET Framework
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
© 2015 Microsoft