Skip to content
ConsoleMonster
Interface

ILinkedSelection

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
abstract

A control whose selection is a position in a list (a row, a point, a choice) and can be shared through app state. Controls with the same ILinkedSelection.LinkKey are linked without referring to each other: when the user moves one, the app writes its ILinkedSelection.LinkIndex to that state key, and every control with the key that can show that position follows it, as it does when a callback writes the key; a position a control cannot show leaves it as it is. DataGrid, ChartView, Select and MultiSelect take part; implement it on a custom InputControl to link it the same way.

Methods

Properties

public abstract string? LinkKey { get; } #

The app-state key shared with the linked controls, or null to take no part.

public abstract int? LinkIndex { get; } #

The position shared through the link (a source row, a point, a choice), or null when there is none.