ListView for WPF
選択モード
ListView の使用 > 選択モード

ListView allows the user to select a single item from the displayed list by default. However, you can choose to select multiple items using SelectionMode property of the C1ListView class.

The SelectionMode property determines how the items are selected in a ListView control. It allows you to disable the selection, select a single item or multiple items. Further, you can also select multiple consecutive items while holding down the Ctrl key.

Selection Modes Description
None
The user can not select any item.
Single
The user can select only one item at a time.
Multiple
The user can select multiple items without holding down a the Ctrl key.
Extended
The user can select multiple consecutive items while holding down the Ctrl key.

The following code shows the selection of multiple items in the ListView control.

XAML
コードのコピー
<c1:C1ListView x:Name="C1ListView" SelectionMode="Multiple" />