Skip to content

TileGrid

Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll

A grid of tiles that always fills its space (Live View’s views, dashboards): TileLayout.Size x TileLayout.Size cells, a TileFrame per tile on its cells. While editing it draws the cell lines, each frame moves (drag inside), resizes (drag an edge or a corner) and removes its tile, and TileGrid.ShowPreview shows where a dragged item would land, TileGrid.ShowSelectionArea the cells a selection rectangle covers. Theme classes: Border.tileSelection, Panel.tile, Border.tileEdit, Border.tileHover, TextBlock.tileTitle, Border.dropPreview.

public sealed class TileGrid : Panel

Inherits Panel

TileGrid()

An empty grid; set TileGrid.Source.

double CellHeight { get; }

The height of one cell.

double CellWidth { get; }

The width of one cell.

ITileGridSource? Source { get; set; }

The tiles and rules shown.

(int X, int Y) CellAt(Point point)

The cell under point (relative to the grid).

bool Contains(Point point)

Whether point (relative to the grid) lies on the grid.

void ShowPreview(TileRect? rect, string? title = null)

Where a dragged item would land, with its name (null hides it).

void ShowSelectionArea(TileRect? rect)

The cells a selection rectangle covers while the user drags over the grid (null hides it).