Skip to content

ISelectableCollectionSource(T)

JaykeBird edited this page Feb 21, 2023 · 4 revisions

Back to home | Back to Reference | View raw text

ISelectableCollectionSource< T> interface

Description

Defines a generic interface for a collection where items within it can be selected.

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph SolidShineUi
  SolidShineUi.ISelectableCollectionSource_1[[ISelectableCollectionSource< T >]]
  class SolidShineUi.ISelectableCollectionSource_1 interfaceStyle;

  end
Loading

Members

Properties

Public properties

Type Name Methods
bool CanSelectMultiple
Get or set if multiple items can be selected in this collection.
get, set
ReadOnlyCollection<T> SelectedItems
Get a list of currently selected items.
get

Methods

Public methods

Returns Name
void AddToSelection(T item)
void ClearSelection()
Clear the list of selected items. No items will be selected.
void Deselect(T item)
bool IsSelected(T item)
void Select(T item)
void SelectAll()
Select all items in the collection.
void SelectRange(IEnumerable<T> items)

Details

Summary

Defines a generic interface for a collection where items within it can be selected.

Generic types

Type Description Constraints
T The type of items in the collection.

Methods

AddToSelection

public void AddToSelection(T item)
Arguments
Type Name Description
T item

Select

public void Select(T item)
Arguments
Type Name Description
T item

Deselect

public void Deselect(T item)
Arguments
Type Name Description
T item

SelectAll

public void SelectAll()
Summary

Select all items in the collection.

ClearSelection

public void ClearSelection()
Summary

Clear the list of selected items. No items will be selected.

IsSelected

public bool IsSelected(T item)
Arguments
Type Name Description
T item

SelectRange

public void SelectRange(IEnumerable<T> items)
Arguments
Type Name Description
IEnumerable<T> items

Properties

SelectedItems

public ReadOnlyCollection<T> SelectedItems { get; }
Summary

Get a list of currently selected items.

CanSelectMultiple

public bool CanSelectMultiple { get; set; }
Summary

Get or set if multiple items can be selected in this collection.

Remarks

Some implementers may not allow this value to be changed via a setter; if so, a NotSupportedException will be thrown.

Events

SelectionChanged

public event SelectionChangedEventHandler SelectionChanged
Summary

Raised when the selection is changed, including additions and removals.

Generated with ModularDoc

Clone this wiki locally