ISelectionItemProvider.IsSelected Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates whether an item is selected.
public:
property bool IsSelected { bool get(); };
public bool IsSelected { get; }
member this.IsSelected : bool
Public ReadOnly Property IsSelected As Boolean
Property Value
true
if the element is selected; otherwise false
.
Examples
The following example code returns true
if this item is in the collection of selected items.
/// <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
Applies to
See also
Співпраця з нами на GitHub
Джерело цього вмісту можна знайти на GitHub, де також можна створювати й переглядати запитання та запити на внесення змін. Докладні відомості наведено в нашому посібнику для співавторів.