Skip to main content

SelectionModel<T> Class

Definition

Namespace: Avalonia.Controls.Selection
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

public class SelectionModel<T> : SelectionNodeBase<T>, 
ISelectionModel, INotifyPropertyChanged

View Source
InheritanceObjectSelectionNodeBase(T) → SelectionModel(T)
ImplementsISelectionModel, INotifyPropertyChanged

Type Parameters

Constructors

SelectionModel(T)()Initializes a new instance of the SelectionModel(T) class
SelectionModel(T)(IEnumerable(T))Initializes a new instance of the SelectionModel(T) class

Properties

AnchorIndex 
Count 
ItemsViewGets an ItemsSourceView(T) of the Source.
(Inherited from SelectionNodeBase(T))
RangesEnabledGets or sets a value indicating whether range selection is currently enabled for the selection node.
(Inherited from SelectionNodeBase(T))
SelectedIndex 
SelectedIndexes 
SelectedItem 
SelectedItems 
SingleSelect 
Source 

Methods

BatchUpdate() 
BeginBatchUpdate() 
Clear() 
CommitDeselect(Int32, Int32)If RangesEnabled, removes the specified range from the selection.
(Inherited from SelectionNodeBase(T))
CommitSelect(Int32, Int32)If RangesEnabled, adds the specified range to the selection.
(Inherited from SelectionNodeBase(T))
Deselect(Int32) 
DeselectRange(Int32, Int32) 
EndBatchUpdate() 
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize()Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCode()Serves as the default hash function.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
IsSelected(Int32) 
MemberwiseClone()Creates a shallow copy of the current Object.
(Inherited from Object)
OnIndexesChanged(Int32, Int32)
(Overrides SelectionNodeBase(T).OnIndexesChanged(Int32, Int32))
OnItemsAdded(Int32, IList)
(Overrides SelectionNodeBase(T).OnItemsAdded(Int32, IList))
OnSelectionRemoved(Int32, Int32, IReadOnlyList(T))
(Overrides SelectionNodeBase(T).OnSelectionRemoved(Int32, Int32, IReadOnlyList(T)))
OnSourceCollectionChanged(NotifyCollectionChangedEventArgs)
(Overrides SelectionNodeBase(T).OnSourceCollectionChanged(NotifyCollectionChangedEventArgs))
OnSourceCollectionChangeFinished()
(Overrides SelectionNodeBase(T).OnSourceCollectionChangeFinished())
OnSourceCollectionChangeStarted()
(Overrides SelectionNodeBase(T).OnSourceCollectionChangeStarted())
OnSourceReset()
(Overrides SelectionNodeBase(T).OnSourceReset())
RaisePropertyChanged(String) 
Select(Int32) 
SelectAll() 
SelectRange(Int32, Int32) 
ToString()Returns a string that represents the current object.
(Inherited from Object)

Events

IndexesChanged 
LostSelection 
PropertyChanged 
SelectionChanged 
SourceReset 

Extension Methods

BatchUpdate()
(Defined by SelectionModelExtensions)

See Also

Reference

Avalonia.Controls.Selection Namespace