Skip to content

NodePickerModel

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

What a NodePicker shows (its data context): open or closed, where on the canvas, the search and the rows. NodePickerModel.Show opens it with the kinds to offer, grouped in their order; a search narrows them by name. The picker calls NodePickerModel.Choose for a click or Enter, the canvas’s view model adds the node in NodePickerModel.Chosen. Vision Center’s pipeline editor and Provisioning’s profile editor.

public class NodePickerModel : ObservableObject

Inherits ObservableObject

RangeObservableCollection<NodePickerEntry> Entries { get; }

The rows the list shows now: each group’s heading, then its kinds.

bool IsEmpty { get; private set; }

No kind matches the search.

bool IsOpen { get; private set; }

The list shows.

double Left { get; private set; }

The left edge of the list on the canvas (pixels of the canvas control).

string SearchText { get; set; }

The search; the list shows the kinds whose name contains it.

IReadOnlyList<NodePickerItem> ShownItems { get; }

The kinds the list shows now, in order.

double Top { get; private set; }

The top edge of the list on the canvas (pixels of the canvas control).

void Choose(NodePickerItem item)

Closes the list and raises NodePickerModel.Chosen with item.

virtual void Close()

Closes the list.

void Show(IEnumerable<NodePickerItem> items, double left, double top)

Opens the list at (left, top) with items, grouped by their NodePickerItem.Group in the order they come; the search starts empty.

event EventHandler<NodePickerItem>? Chosen

A kind was chosen (a click or Enter in the search); the list is closed before.