Share via


ISelectionProvider.CanSelectMultiple 屬性

定義

取得值,指定使用者介面自動化提供者是否允許同時選取一個以上的子項目。

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

屬性值

Boolean

如果允許多重選取,則為 true;否則為 false

範例

下列範例針對不允許一次選取多個專案的清單,示範這個方法的實作。

/// <summary>
/// Specifies whether selection of more than one item at a time is supported.
/// </summary>
bool ISelectionProvider.CanSelectMultiple
{
    get
    {
        return false;
    }
}
''' <summary>
''' Specifies whether selection of more than one item at a time is supported.
''' </summary>
Private ReadOnly Property CanSelectMultiple() As Boolean Implements ISelectionProvider.CanSelectMultiple
    Get
        Return False
    End Get
End Property

備註

此屬性可能是動態的。 例如,在罕見的情況下,控制項可能會允許在初始化時選取多個專案,但後續只允許進行單一選取。

適用於

另請參閱