ListBox::SelectionMode Property
.NET Framework (current version)
Gets or sets the selection behavior for a ListBox.
Assembly: PresentationFramework (in PresentationFramework.dll)
public: property SelectionMode SelectionMode { SelectionMode get(); void set(SelectionMode value); }
Property Value
Type: System.Windows.Controls::SelectionModeOne of the SelectionMode values. The default is Single selection.
The following example sets the SelectionMode property to Multiple.
<ListBox SelectionMode="Multiple"> <DockPanel> <Image Source="data\cat.png"/> <TextBlock>CAT</TextBlock> </DockPanel> <DockPanel> <Image Source="data\dog.png"/> <TextBlock>DOG</TextBlock> </DockPanel> <DockPanel> <Image Source="data\fish.png"/> <TextBlock>FISH</TextBlock> </DockPanel> </ListBox>
.NET Framework
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Show: