ISelectionItemProvider.IsSelected 속성

정의

항목이 선택되었는지 여부를 나타내는 값을 가져옵니다.

public:
 property bool IsSelected { bool get(); };
public bool IsSelected { get; }
member this.IsSelected : bool
Public ReadOnly Property IsSelected As Boolean

속성 값

Boolean

요소가 선택되었으면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제 코드는 이 항목이 선택한 항목의 컬렉션에 있으면 반환 true 합니다.

/// <summary>
/// Specifies whether the item is selected.
/// </summary>
/// <remarks>
/// selectedItems is the collection of selected ListItems.
/// </remarks>
public bool IsSelected
{
    get
    {
        return selectedItems.Contains(this);
    }
}
''' <summary>
''' Specifies whether the item is selected.
''' </summary>
''' <remarks>
''' selectedItems is the collection of selected ListItems.
''' </remarks>
Public ReadOnly Property IsSelected() As Boolean Implements ISelectionItemProvider.IsSelected
    Get
        Return selectedItems.Contains(Me)
    End Get
End Property

적용 대상

추가 정보