-
Notifications
You must be signed in to change notification settings - Fork 3
SelectableCollectionView(T)
Back to home | Back to Reference | View raw text
A type of CollectionView that operates as a SelectableCollection. This can be used as a SelectPanel's ItemsSource if T
derives from SelectableUserControl.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi
SolidShineUi.SelectableCollectionView_1[[SelectableCollectionView< T >]]
SolidShineUi.ISelectableCollectionSource_1[[ISelectableCollectionSource< T >]]
class SolidShineUi.ISelectableCollectionSource_1 interfaceStyle;
end
subgraph System.Collections.Generic
System.Collections.Generic.IEnumerable_1[[IEnumerable]]
end
subgraph System.Collections
System.Collections.IEnumerable[[IEnumerable]]
end
subgraph System.Windows.Data
System.Windows.Data.ListCollectionView[[ListCollectionView]]
end
SolidShineUi.ISelectableCollectionSource_1 --> SolidShineUi.SelectableCollectionView_1
System.Collections.Generic.IEnumerable_1 --> SolidShineUi.SelectableCollectionView_1
System.Collections.IEnumerable --> SolidShineUi.SelectableCollectionView_1
System.Windows.Data.ListCollectionView --> SolidShineUi.SelectableCollectionView_1
Type | Name | Methods |
---|---|---|
bool |
CanSelectMultiple Get if multiple items can be selected at once. This property cannot be changed or set to; trying to call the setter will raise a NotSupportedException . |
get, set |
T |
Item |
get |
ReadOnlyCollection <T > |
SelectedItems Get a list of currently selected items. |
get |
Returns | Name |
---|---|
void |
AddToSelection (T item) |
void |
ClearSelection ()Clear the list of selected items. Nothing will be selected. |
bool |
Contains (T item) |
void |
Deselect (T item) |
int |
IndexOf (T item) |
bool |
IsSelected (T item) |
void |
Remove (T item) |
void |
Select (T item) |
void |
SelectAll ()Select all items in the base collection. |
void |
SelectRange (IEnumerable <T > items) |
A type of CollectionView that operates as a SelectableCollection. This can be used as a SelectPanel's ItemsSource if T
derives from SelectableUserControl.
Type | Description | Constraints |
---|---|---|
T |
The type of items in the collection. |
-
ISelectableCollectionSource
<T
> -
IEnumerable
<T
> IEnumerable
ListCollectionView
public SelectableCollectionView(List<T> collection)
Type | Name | Description |
---|---|---|
List <T > |
collection |
public SelectableCollectionView(IList collection)
Type | Name | Description |
---|---|---|
IList |
collection | The collection that is represented in this view. |
Create a SelectableCollectionView, that represents a view of the specified list.
Name | Description |
---|---|
ArgumentException | Thrown if collection is not a generic IList of type T ( IList<T> ). |
public virtual void AddToSelection(T item)
Type | Name | Description |
---|---|---|
T |
item |
public virtual void Select(T item)
Type | Name | Description |
---|---|---|
T |
item |
public virtual void Deselect(T item)
Type | Name | Description |
---|---|---|
T |
item |
public virtual void SelectAll()
Select all items in the base collection.
public virtual void ClearSelection()
Clear the list of selected items. Nothing will be selected.
public virtual bool IsSelected(T item)
Type | Name | Description |
---|---|---|
T |
item |
public virtual void SelectRange(IEnumerable<T> items)
Type | Name | Description |
---|---|---|
IEnumerable <T > |
items |
public int IndexOf(T item)
Type | Name | Description |
---|---|---|
T |
item |
public bool Contains(T item)
Type | Name | Description |
---|---|---|
T |
item |
public void Remove(T item)
Type | Name | Description |
---|---|---|
T |
item |
public virtual ReadOnlyCollection<T> SelectedItems { get; }
Get a list of currently selected items.
public virtual bool CanSelectMultiple { get; set; }
Get if multiple items can be selected at once. This property cannot be changed or set to; trying to call the setter will raise a NotSupportedException .
Name | Description |
---|---|
NotSupportedException | Raised if the setter for this property is called. This property is implemented as read-only here. |
public T Item { get; }
public event SelectionChangedEventHandler SelectionChanged
Raised when the list of selected items is changed.
Generated with ModularDoc