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 : ControlInherits Control
XAML properties
Section titled “XAML properties”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. |
Properties
Section titled “Properties”IReadOnlyList<Rect> Cards { get; }Where the cards are (canvas units), after the last layout (tests).
Methods
Section titled “Methods”IndexAt
Section titled “IndexAt”int IndexAt(Point screen)The card under a point of the control; -1: none.
PickerPlace
Section titled “PickerPlace”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.
PlusIndexAt
Section titled “PlusIndexAt”int PlusIndexAt(Point screen)The card whose + is under a point of the control; -1: none.
PlusRect
Section titled “PlusRect”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.
Fields
Section titled “Fields”CardWidth
Section titled “CardWidth”const double CardWidth = 300The width of a card: wider than a pipeline’s, a result message needs the room.
const double Gap = 40The gap between a card (or its message) and the next card.
MinFitZoom
Section titled “MinFitZoom”const double MinFitZoom = 0.8Fit view never makes the cards smaller than this: a long chain is panned instead.
TopRoom
Section titled “TopRoom”const double TopRoom = 24Fit view leaves at most this much above the first card (screen pixels).