Interface IFocusableControl
- Namespace
- SharpConsoleUI.Controls
- Assembly
- SharpConsoleUI.dll
Interface for controls that can receive focus
public interface IFocusableControl : IWindowControl, IDisposable
- Inherited Members
- Extension Methods
Properties
CanReceiveFocus
Whether this control can receive focus
bool CanReceiveFocus { get; }
Property Value
HasFocus
Whether this control currently has focus
bool HasFocus { get; set; }
Property Value
Methods
SetFocus(bool, FocusReason)
Sets focus to this control
void SetFocus(bool focus, FocusReason reason = FocusReason.Programmatic)
Parameters
focusboolWhether to give or remove focus
reasonFocusReasonThe reason for the focus change
Events
GotFocus
Event fired when the control gains focus
event EventHandler? GotFocus
Event Type
LostFocus
Event fired when the control loses focus
event EventHandler? LostFocus