Table of Contents

Property Source

Namespace
Terminal.Gui.Input
Assembly
Terminal.Gui.dll

Source

A weak reference to the View that was the source of the command invocation, if any. (e.g. the view the user clicked on or the view that had focus when a key was pressed). Use Source?.TryGetTarget(out View? view) to safely access the source view.

WeakReference<View>? Source { get; set; }

Property Value

WeakReference<View>

Remarks

Uses WeakReference to prevent memory leaks when views are disposed during command propagation.