ISelectionProvider.CanSelectMultiple 属性

定义

获取一个值,该值指定 UI 自动化提供程序是否允许同时选择多个子元素。

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

注解

此属性可能是动态的。 例如,在极少数情况下,控件可能会允许在初始化时选择多个项,但随后只允许进行单个选择。

适用于

另请参阅