Live tiles layout algorithm
Windows 8/10 live tiles are varying-size (small (1x1), medium (2x2), wide (4x2), large (4x4)) non-overlapping blocks floating anywhere, across different non-overlapping groups; though, while dragging tiles, the GUI automatically shifts the needed tiles, with a smooth animation. Vertical container: in Windows 10, the Start Menu consists of tiles whose groups are organized vertically, though depending on the width of the Start Menu, you can have up to 3 groups in the same line. Groups in Windows 10's Start Menu are of a fixed size. Horizontal container: in Windows 8, the Start Screen represents tile groups horizontally (simpler than the case of Windows 10 Start Menu in that case). I would like to know the logical steps for implementing: Adding a tile to the layout (last position of a group; should not be complex) Removing a tile from the layout (if there are adjacent tiles ahead, then they are shifted behind) Drag/drop behavior While a tile is dragged around, other intersecting tiles are shiftted to somewhere, and are definitely shifted on drag stop (drag intersecting out later would cancel the shift) When a tile is dropped, it either shifts other conflicting tiles or snaps to the layout grid. When a tile drags over other tile(s), these tiles won't be shifted (therefore still busy at the layout) only if these tiles can't be shifted further from their actual position (e.g. they are the at beginning of their group)). Resizing a tile (some shifting of other conflicting tiles may occur) Note: Tiles may be transferred across groups.
Windows 8/10 live tiles are varying-size (small (1x1), medium (2x2), wide (4x2), large (4x4)) non-overlapping blocks floating anywhere, across different non-overlapping groups; though, while dragging tiles, the GUI automatically shifts the needed tiles, with a smooth animation.
Vertical container: in Windows 10, the Start Menu consists of tiles whose groups are organized vertically, though depending on the width of the Start Menu, you can have up to 3 groups in the same line. Groups in Windows 10's Start Menu are of a fixed size.
Horizontal container: in Windows 8, the Start Screen represents tile groups horizontally (simpler than the case of Windows 10 Start Menu in that case).
I would like to know the logical steps for implementing:
- Adding a tile to the layout (last position of a group; should not be complex)
- Removing a tile from the layout (if there are adjacent tiles ahead, then they are shifted behind)
- Drag/drop behavior
- While a tile is dragged around, other intersecting tiles are shiftted to somewhere, and are definitely shifted on drag stop (drag intersecting out later would cancel the shift)
- When a tile is dropped, it either shifts other conflicting tiles or snaps to the layout grid.
- When a tile drags over other tile(s), these tiles won't be shifted (therefore still busy at the layout) only if these tiles can't be shifted further from their actual position (e.g. they are the at beginning of their group)).
- Resizing a tile (some shifting of other conflicting tiles may occur)
Note: Tiles may be transferred across groups.