ComboBox::SelectionBoxItem Property
.NET Framework (current version)
Gets the item that is displayed in the selection box.
Assembly: PresentationFramework (in PresentationFramework.dll)
public: property Object^ SelectionBoxItem { Object^ get(); private: void set(Object^ value); }
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 | None |
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.
<ContentPresenter x:Name="ContentSite" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Margin="3,3,23,3" VerticalAlignment="Stretch" HorizontalAlignment="Left"> </ContentPresenter>
.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: