Skip to content

NodeChainCanvas

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

The canvas of a NodeChain: the cards top to bottom in the middle, linked from the output dot of one to the input dot of the next, the message of a card directly below it, a status icon at a card’s top right. Drag the background to pan, the wheel zooms, a click selects a card, a click on the + below a card (while NodeChain.CanAdd) raises NodeChain.AddRequested. Shared look with Vision Center’s canvas (NodeCanvasPainter).

public sealed class NodeChainCanvas : Control

Inherits Control

Set them in XAML (<ui:NodeChainCanvas Name="..." />) or bind them.

Name Type Description
Chain NodeChain? The chain it draws: its nodes, the selected one and the view.
IReadOnlyList<Rect> Cards { get; }

Where the cards are (canvas units), after the last layout (tests).

int IndexAt(Point screen)

The card under a point of the control; -1: none.

Point PickerPlace(int index)

Where the node list of the + below the card at index opens (pixels of the control): right of the +, its top level with the +, higher when the list would not fit above the bottom.

int PlusIndexAt(Point screen)

The card whose + is under a point of the control; -1: none.

Rect PlusRect(int index)

Where the + below the card at index is (canvas units): below the last card and its message (NodeCanvasGeometry.PlusRect), on the straight link in the gap below any other card.

const double CardWidth = 300

The width of a card: wider than a pipeline’s, a result message needs the room.

const double Gap = 40

The gap between a card (or its message) and the next card.

const double MinFitZoom = 0.8

Fit view never makes the cards smaller than this: a long chain is panned instead.

const double TopRoom = 24

Fit view leaves at most this much above the first card (screen pixels).