Table of Contents

Method OnHasFocusChanging

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

OnHasFocusChanging(bool, bool, View?, View?)

Invoked when HasFocus is about to change. This method is called before the HasFocusChanging event is raised.

protected virtual bool OnHasFocusChanging(bool currentHasFocus, bool newHasFocus, View? currentFocused, View? newFocused)

Parameters

currentHasFocus bool

The current value of HasFocus.

newHasFocus bool

The value HasFocus will have if the focus change happens.

currentFocused View

The view that is currently Focused. May be null.

newFocused View

The view that will be focused. May be null.

Returns

bool

true, if the change to HasFocus is to be cancelled, false otherwise.

Remarks

Use OnHasFocusChanged(bool, View?, View?) to be notified after the focus has changed.