Skip to content

Sortable - Grid

Tiles in a wrapping grid, each in a drop target with Edges="BdndEdges.Horizontal": a grid is a horizontal list that wraps, so a tile dragged over another lands on the side the pointer is closest to, whatever row it is in. Within one list the drop is a reorder: BdndList.ReorderIndex works out where the tile ends up - one place less when it came from before the tile it was dropped on, since taking it out shifts the rest - and BdndList.Reorder moves it there. With the keyboard, Left and Right step through the gaps between the tiles, and Up and Down go a row up or down - to the gap closest across, so a tile moved down keeps its column - rather than one tile on. (BdndEdges.All would report the nearest of all four edges, for tiles where above and below mean something of their own.)

Amber
Blue
Coral
Denim
Emerald
Fuchsia
Gold
Hazel
Indigo
Jade
Khaki
Lilac

Order: Amber, Blue, Coral, Denim, Emerald, Fuchsia, Gold, Hazel, Indigo, Jade, Khaki, Lilac

An unhandled error has occurred. Reload 🗙