ListBoxItem::IsSelected Property
.NET Framework (current version)
Gets or sets a value that indicates whether a ListBoxItem is selected.
Assembly: PresentationFramework (in PresentationFramework.dll)
public: [BindableAttribute(true)] property bool IsSelected { bool get(); void set(bool value); }
Property Value
Type: System::Booleantrue if the item is selected; otherwise, false. The default is false.
To select a ListBoxItem in a ListBox, set this property to true.
Identifier field | |
Metadata properties set to true |
The following example shows how to set a list box item to be selected when the list box is created.
<ListBoxItem Name="item0" IsSelected="true">Item 0</ListBoxItem>
.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: