Search Results for

    Show / Hide Table of Contents

    Class ConsoleResizeHandler

    The console resize listener module

    Inheritance
    object
    ConsoleResizeHandler
    Namespace: Terminaux.Base
    Assembly: Terminaux.dll
    Syntax
    public static class ConsoleResizeHandler

    Properties

    | Edit this page View Source

    IsListening

    Whether the console resize handler is listening to resize events or not

    Declaration
    public static bool IsListening { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    RunEssentialHandler

    Whether to run the base console resize handler or not after running a custom action

    Declaration
    public static bool RunEssentialHandler { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    GetCurrentConsoleSize()

    Gets the console size from the cached window height and width position

    Declaration
    public static (int Width, int Height) GetCurrentConsoleSize()
    Returns
    Type Description
    (int Width, int Height)
    | Edit this page View Source

    StartResizeListener(Action<int, int, int, int>?)

    Starts the console resize listener

    Declaration
    public static void StartResizeListener(Action<int, int, int, int>? customHandler = null)
    Parameters
    Type Name Description
    Action<int, int, int, int> customHandler

    Specifies the custom console resize handler that will be called if resize is detected

    | Edit this page View Source

    StopResizeListener()

    Stops the console resize listener

    Declaration
    public static void StopResizeListener()
    | Edit this page View Source

    WasResized(bool)

    This property checks to see if the console has been resized since the last time it has been called or the listener has started.

    Declaration
    public static bool WasResized(bool reset = true)
    Parameters
    Type Name Description
    bool reset

    Reset the resized value once this is called

    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX