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

注釈

このプロパティは動的にすることができます。 たとえば、コントロールの初期状態では、既定で項目が選択されていない可能性があります。つまり、 IsSelectionRequiredfalse。 ただし、項目を選択した後、コントロールには常に少なくとも 1 つの項目が選択されている必要があります。

適用対象

こちらもご覧ください