ListBox.SelectionMode ListBox.SelectionMode ListBox.SelectionMode ListBox.SelectionMode Property

정의

ListBox에 대한 선택 동작을 가져오거나 설정합니다.Gets or sets the selection behavior for a ListBox.

public:
 property System::Windows::Controls::SelectionMode SelectionMode { System::Windows::Controls::SelectionMode get(); void set(System::Windows::Controls::SelectionMode value); };
public System.Windows.Controls.SelectionMode SelectionMode { get; set; }
member this.SelectionMode : System.Windows.Controls.SelectionMode with get, set
Public Property SelectionMode As SelectionMode

속성 값

SelectionMode 값 중 하나입니다.One of the SelectionMode values. 기본값은 Single 선택입니다.The default is Single selection.

예제

다음 예제에서는 합니다 SelectionMode 속성을 Multiple입니다.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>

설명

종속성 속성 정보Dependency Property Information

식별자 필드Identifier field SelectionModeProperty
메타 데이터 속성 설정 trueMetadata properties set to true 없음None

적용 대상