Skip to main content

SelectionModel<T> Class

Definition​

Assembly:Avalonia.Controls
Package:Avalonia
public class SelectionModel<T>

Inheritance: SelectionNodeBase<> -> SelectionModel<T>

Implements: ISelectionModel, INotifyPropertyChanged

Constructors​

NameDescription
SelectionModel<T> (2 overloads)No summary available.

SelectionModel<T> overloads​

SelectionModel<T> Constructor​

public SelectionModel<T>()

SelectionModel<T> Constructor​

public SelectionModel<T>(System.Collections.Generic.IEnumerable<T> source)
Parameters​

source System.Collections.Generic.IEnumerable<T>

Methods​

NameDescription
BatchUpdateNo summary available.
BeginBatchUpdateNo summary available.
ClearNo summary available.
DeselectNo summary available.
DeselectRangeNo summary available.
EndBatchUpdateNo summary available.
IsSelectedNo summary available.
SelectNo summary available.
SelectAllNo summary available.
SelectRangeNo summary available.

BatchUpdate Method​

public Avalonia.Controls.Selection.SelectionModel<T>.BatchUpdateOperation<T><T> BatchUpdate()

Returns​

Avalonia.Controls.Selection.SelectionModel<T>.BatchUpdateOperation<T><T>

BeginBatchUpdate Method​

public void BeginBatchUpdate()

Clear Method​

public void Clear()

Deselect Method​

public void Deselect(int index)

Parameters​

index int

DeselectRange Method​

public void DeselectRange(int start, int end)

Parameters​

start int

end int

EndBatchUpdate Method​

public void EndBatchUpdate()

IsSelected Method​

public bool IsSelected(int index)

Parameters​

index int

Returns​

bool

Select Method​

public void Select(int index)

Parameters​

index int

SelectAll Method​

public void SelectAll()

SelectRange Method​

public void SelectRange(int start, int end)

Parameters​

start int

end int

Properties​

NameDescription
AnchorIndexNo summary available.
CountNo summary available.
SelectedIndexNo summary available.
SelectedIndexesNo summary available.
SelectedItemNo summary available.
SelectedItemsNo summary available.
SingleSelectNo summary available.
SourceNo summary available.

AnchorIndex Property​

public int AnchorIndex { get; set; }

Count Property​

public int Count { get; set; }

SelectedIndex Property​

public int SelectedIndex { get; set; }

SelectedIndexes Property​

public System.Collections.Generic.IReadOnlyList<int> SelectedIndexes { get; set; }

SelectedItem Property​

public T SelectedItem { get; set; }

SelectedItems Property​

public System.Collections.Generic.IReadOnlyList<T> SelectedItems { get; set; }

SingleSelect Property​

public bool SingleSelect { get; set; }

Source Property​

public System.Collections.IEnumerable Source { get; set; }

Events​

NameDescription
IndexesChangedNo summary available.
LostSelectionNo summary available.
PropertyChangedNo summary available.
SelectionChangedNo summary available.
SourceResetNo summary available.

IndexesChanged Event​

public event EventHandler<Avalonia.Controls.Selection.SelectionModelIndexesChangedEventArgs> IndexesChanged

LostSelection Event​

public event EventHandler LostSelection

PropertyChanged Event​

public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged

SelectionChanged Event​

public event EventHandler<Avalonia.Controls.Selection.SelectionModelSelectionChangedEventArgs<T><T>> SelectionChanged

SourceReset Event​

public event EventHandler SourceReset