Selector.IsSelected Attached Property

Gets or sets a value that indicates whether an item is selected.

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

See Selector.GetIsSelected, Selector.SetIsSelected
See Selector.GetIsSelected, Selector.SetIsSelected
See Selector.GetIsSelected, Selector.SetIsSelected
<object Selector.IsSelected="bool" .../>

Property Value

true if the item is selected; otherwise, false.

Identifier Field

IsSelectedProperty, registered as Attached

Metadata Flags


Use this property to determine where there are any selected items in the Selector.

The following example shows how to create a ComboBox that has its first item selected when the control initializes.

<ComboBox IsEditable="true">
    <ComboBoxItem IsSelected="true">Item1</ComboBoxItem>

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.