Table of Contents

Class FocusStateChangedEventArgs

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Event arguments for focus state changes

public class FocusStateChangedEventArgs : EventArgs
Inheritance
FocusStateChangedEventArgs
Inherited Members

Constructors

FocusStateChangedEventArgs(FocusState, FocusState)

Initializes a new instance of the FocusStateChangedEventArgs class.

public FocusStateChangedEventArgs(FocusState previousState, FocusState newState)

Parameters

previousState FocusState

The previous focus state before the change.

newState FocusState

The new focus state after the change.

Properties

ControlChanged

Whether the focused control changed

public bool ControlChanged { get; }

Property Value

bool

GainedFocusControl

The control that gained focus (if any)

public IInteractiveControl? GainedFocusControl { get; }

Property Value

IInteractiveControl

LostFocusControl

The control that lost focus (if any)

public IInteractiveControl? LostFocusControl { get; }

Property Value

IInteractiveControl

NewState

The new focus state

public FocusState NewState { get; }

Property Value

FocusState

PreviousState

The previous focus state

public FocusState PreviousState { get; }

Property Value

FocusState

WindowChanged

Whether the focused window changed

public bool WindowChanged { get; }

Property Value

bool