Custom Control

Controls are the third plugin type — a DLL in the Controls folder next to QInsight.exe. After restarting the application the control appears in the Controls panel and can be dragged onto workspaces like any shipped element.

Basics

A control implements the IControlBase interface; in practice it inherits from the ControlBase base class, which handles the common properties (position, size, colors, locking, serialization of variable bindings). Key points:

  • The Label in the specification = the text in the Controls panel.
  • BindVariable(variable) — called when a variable is dropped onto the control. A single-value control (like Gauge) replaces the previous variable; a multi-value one (like Graph) adds it.
  • UpdateVariableValueAsync(...) — live values arrive here; the control manages its own redraw rate (Refresh time).
  • OnEditToRun / OnRunToEdit — reactions to switching between the edit and runtime mode (e.g. the graph clears its data).
  • Properties that should survive saving the project are serialized together with the control.

MVVM

The control UI is written strictly MVVM: composition in XAML, interaction via bindings and commands, logic in the ViewModel — no logic in code-behind. The shipped Single-Signal control is the reference pattern.

Deployment

Copy the compiled DLL into the Controls folder and restart QInsight. The control appears in the Controls panel; its bindings and settings are saved into the project automatically.

Next

An overview of everything QInsight ships — Reference.