C# Class PowerArgs.Cli.ConsoleControl

Inheritance: Rectangular
Show file Open project: adamabdelhamed/PowerArgs Class Usage Examples

Public Methods

Method Description
ConsoleControl ( ) : System

Creates a new ConsoleControl

ToString ( ) : string

Gets the type and Id of this control

TryFocus ( ) : bool

Tries to give this control focus. If the focus is in the visual tree, and is in the current focus layer, and has it's CanFocus property to true then focus should be granted.

TryUnfocus ( ) : bool

Tries to unfocus this control.

Protected Methods

Method Description
OnPaint ( ConsoleBitmap context ) : void

You should override this method if you are building a custom control, from scratch, and need to control every detail of the painting process. If possible, prefer to create your custom control by deriving from ConsolePanel, which will let you assemble a new control from others.

Private Methods

Method Description
AddedToVisualTreeInternal ( ) : void
BeforeAddedToVisualTreeInternal ( ) : void
BeforeRemovedFromVisualTreeInternal ( ) : void
CalculateAbsolutePosition ( ) : Point
CalculateRelativePosition ( ConsoleControl parent ) : Point
Event ( ) : System
FireFocused ( bool focused ) : void
HandleKeyInput ( ConsoleKeyInfo info ) : void
Paint ( ConsoleBitmap context ) : void
PaintTo ( ConsoleBitmap context ) : void
RemovedFromVisualTreeInternal ( ) : void

Method Details

ConsoleControl() public method

Creates a new ConsoleControl
public ConsoleControl ( ) : System
return System

OnPaint() protected method

You should override this method if you are building a custom control, from scratch, and need to control every detail of the painting process. If possible, prefer to create your custom control by deriving from ConsolePanel, which will let you assemble a new control from others.
protected OnPaint ( ConsoleBitmap context ) : void
context ConsoleBitmap The scoped bitmap that you can paint on
return void

ToString() public method

Gets the type and Id of this control
public ToString ( ) : string
return string

TryFocus() public method

Tries to give this control focus. If the focus is in the visual tree, and is in the current focus layer, and has it's CanFocus property to true then focus should be granted.
public TryFocus ( ) : bool
return bool

TryUnfocus() public method

Tries to unfocus this control.
public TryUnfocus ( ) : bool
return bool