ISelectionProvider.IsSelectionRequired プロパティ

定義

UI オートメーション プロバイダーが少なくとも 1 つの子要素の選択を必要とするかどうかを示す値を取得します。

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

プロパティ値

選択が必要な場合は true。それ以外の場合は false

次の例は、アイテムを常に選択する必要があるリストに対するこのメソッドの実装を示しています。

/// <summary>
/// Specifies whether the list must have an item selected at all times.
/// </summary>
bool ISelectionProvider.IsSelectionRequired
{
    get
    {
        return true;
    }
}
''' <summary>
''' Specifies whether the list must have an item selected at all times.
''' </summary>
Private ReadOnly Property IsSelectionRequired() As Boolean Implements ISelectionProvider.IsSelectionRequired
    Get
        Return True
    End Get
End Property

注釈

このプロパティは動的にすることができます。 たとえば、コントロールの初期状態では、既定では項目が選択されていない場合があります。つまり IsSelectionRequired 、 は です false。 しかし、項目が 1 つ選択されると、このコントロールは、項目が常に 1 つ以上選択された状態を保持する必要があります。

適用対象

こちらもご覧ください