Table of Contents

Property Source

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

Source

Gets the View that registered the binding as a weak reference.

public WeakReference<View>? Source { readonly get; init; }

Property Value

WeakReference<View>

Remarks

Uses WeakReference<T> to prevent memory leaks when views are disposed while bindings still reference them.

For key bindings, this is the view that registered the binding.

For mouse bindings, this is the view that received the mouse event.

For programmatic invocations, this is the view that called InvokeCommand(Command).