ItemMove<TItem>

Describes a completed drag-to-reorder: which item moved and where it went.
public sealed record ItemMove<TItem>(TItem Item, int FromSection, int FromIndex, int ToSection, int ToIndex)
Type parameterSummary
TItemThe item type of the collection the move happened in.

Constructors

Initializes a new instance of the ItemMove<TItem> class.

public ItemMove(
  TItem Item,
  int FromSection,
  int FromIndex,
  int ToSection,
  int ToIndex)
ParameterSummary
TItem ItemThe item the user moved.
int FromSectionThe section the item left. 0 for a flat list.
int FromIndexThe item's index within its old section.
int ToSectionThe section the item landed in. 0 for a flat list.
int ToIndexThe item's index within its new section.

Properties

FromIndex

The item's index within its old section.

Type: int

public int FromIndex { get; init; }

FromSection

The section the item left. 0 for a flat list.

Type: int

public int FromSection { get; init; }

Item

The item the user moved.

Type: TItem

public TItem Item { get; init; }

ToIndex

The item's index within its new section.

Type: int

public int ToIndex { get; init; }

ToSection

The section the item landed in. 0 for a flat list.

Type: int

public int ToSection { get; init; }