Search Results for

    Interface IWindow

    Used to interact with OS windows. All values returned by properties of IWindow represent real (unscaled by DPI settings) values.

    All operations can throw InvalidWindowReferenceException at any time. Your code should be able to handle this gracefully.

    All property reads return default but valid values once the window is dead and never throw InvalidWindowReferenceException.

    Inherited Members
    System.IEquatable<WinMan.IWindow>.Equals(WinMan.IWindow)
    Namespace: WinMan
    Assembly: WinMan.dll
    Syntax
    public interface IWindow : IEquatable<IWindow>

    Properties

    | Improve this Doc View Source

    CanClose

    True if the window can be closed by the current process.

    Declaration
    bool CanClose { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CanMaximize

    True if the window supports maximization. Returns false once the window is dead (IsAlive=false).

    Declaration
    bool CanMaximize { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CanMinimize

    True if the window supports minimization. Returns false once the window is dead (IsAlive=false).

    Declaration
    bool CanMinimize { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CanMove

    True if the window can be moved. Returns false once the window is dead (IsAlive=false).

    Declaration
    bool CanMove { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CanReorder

    True if the window can be reordered in the visual hierarchy.

    Declaration
    bool CanReorder { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CanResize

    True if the window is resizable. Returns false once the window is dead (IsAlive=false).

    Declaration
    bool CanResize { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    FrameMargins

    Declaration
    Rectangle FrameMargins { get; }
    Property Value
    Type Description
    Rectangle
    | Improve this Doc View Source

    Handle

    The OS-specific window handle. Returns IntPtr.Zero once the window is dead (IsAlive=false).

    Declaration
    IntPtr Handle { get; }
    Property Value
    Type Description
    System.IntPtr
    | Improve this Doc View Source

    IsAlive

    Is the window instance alive.

    Declaration
    bool IsAlive { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsFocused

    Is this the foreground window. Returns false once the window is dead (IsAlive=false).

    Declaration
    bool IsFocused { get; }
    Property Value
    Type Description
    System.Boolean
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    IsTopmost

    True if the window is always drawn above other non-topmost windows. Returns false once the window is dead (IsAlive=false).

    Declaration
    bool IsTopmost { get; }
    Property Value
    Type Description
    System.Boolean
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    MaxSize

    The maxmimum allowed size for this window.

    Declaration
    Point? MaxSize { get; }
    Property Value
    Type Description
    System.Nullable<Point>
    Exceptions
    Type Condition
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    MinSize

    The minimum allowed size for this window.

    Declaration
    Point? MinSize { get; }
    Property Value
    Type Description
    System.Nullable<Point>
    Exceptions
    Type Condition
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    Position

    The client rectangle of the window, relative to the workarea. Returns Rectangle.Empty once the window is dead (IsAlive=false).

    Declaration
    Rectangle Position { get; }
    Property Value
    Type Description
    Rectangle
    Exceptions
    Type Condition
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    State

    The current state of the window. Returns WindowState.Minimized once the window is dead (IsAlive=false).

    Declaration
    WindowState State { get; }
    Property Value
    Type Description
    WindowState
    Exceptions
    Type Condition
    System.Runtime.InteropServices.ExternalException
    System.InvalidOperationException

    If the window cannot be changed to that state due to other reasons.

    | Improve this Doc View Source

    SyncRoot

    The internal synchronisation object.

    Declaration
    object SyncRoot { get; }
    Property Value
    Type Description
    System.Object
    | Improve this Doc View Source

    Title

    The title of the window. Returns string.Empty once the window is dead (IsAlive=false).

    Declaration
    string Title { get; }
    Property Value
    Type Description
    System.String
    Exceptions
    Type Condition
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    Workspace

    The IWorkspace which returned this IWindow instance.

    Declaration
    IWorkspace Workspace { get; }
    Property Value
    Type Description
    IWorkspace

    Methods

    | Improve this Doc View Source

    BringToFront()

    Positions the window in front of all other non-topmost windows.

    Declaration
    void BringToFront()
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    Close()

    Sends a close event to the window.

    Declaration
    void Close()
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    GetNextWindow()

    Gets the next window in the workspace. The previous window is the window below this one.

    Declaration
    IWindow GetNextWindow()
    Returns
    Type Description
    IWindow
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    GetPreviousWindow()

    Gets the previous window in the workspace. The previous window is the window above this one.

    Declaration
    IWindow GetPreviousWindow()
    Returns
    Type Description
    IWindow
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    GetProcess()

    Returns the process the window belongs to.

    Declaration
    Process GetProcess()
    Returns
    Type Description
    System.Diagnostics.Process
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    InsertAfter(IWindow)

    Moves the current window to be positioned after the given one in the z-order.

    Declaration
    void InsertAfter(IWindow other)
    Parameters
    Type Name Description
    IWindow other
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    RequestFocus()

    Activates the window.

    Declaration
    void RequestFocus()
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    SendToBack()

    Positions the window behind all other non-topmost windows.

    Declaration
    void SendToBack()
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    SetPosition(Rectangle)

    Changes the location of the window.

    Declaration
    void SetPosition(Rectangle newLocation)
    Parameters
    Type Name Description
    Rectangle newLocation
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    SetState(WindowState)

    Changes the state of the window.

    Declaration
    void SetState(WindowState state)
    Parameters
    Type Name Description
    WindowState state
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException
    | Improve this Doc View Source

    SetTopmost(Boolean)

    Changes the topmost property of the window.

    Declaration
    void SetTopmost(bool topmost)
    Parameters
    Type Name Description
    System.Boolean topmost
    Exceptions
    Type Condition
    InvalidWindowReferenceException
    System.Runtime.InteropServices.ExternalException

    Events

    | Improve this Doc View Source

    Added

    The window was added to the workspace.

    Declaration
    event EventHandler<WindowChangedEventArgs> Added
    Event Type
    Type Description
    System.EventHandler<WindowChangedEventArgs>
    | Improve this Doc View Source

    Destroyed

    The window instance was destroyed. IsAlive will be false.

    Declaration
    event EventHandler<WindowChangedEventArgs> Destroyed
    Event Type
    Type Description
    System.EventHandler<WindowChangedEventArgs>
    | Improve this Doc View Source

    GotFocus

    The window became the foreground window.

    Declaration
    event EventHandler<WindowFocusChangedEventArgs> GotFocus
    Event Type
    Type Description
    System.EventHandler<WindowFocusChangedEventArgs>
    | Improve this Doc View Source

    LostFocus

    The window lost focus.

    Declaration
    event EventHandler<WindowFocusChangedEventArgs> LostFocus
    Event Type
    Type Description
    System.EventHandler<WindowFocusChangedEventArgs>
    | Improve this Doc View Source

    PositionChanged

    The position of the window has changed. This might be due to a user interaction or through some form of scripted behaviour.

    Declaration
    event EventHandler<WindowPositionChangedEventArgs> PositionChanged
    Event Type
    Type Description
    System.EventHandler<WindowPositionChangedEventArgs>
    | Improve this Doc View Source

    PositionChangeEnd

    Event emitted when the user interaction driving the resize or move of the window ends.

    Declaration
    event EventHandler<WindowPositionChangedEventArgs> PositionChangeEnd
    Event Type
    Type Description
    System.EventHandler<WindowPositionChangedEventArgs>
    | Improve this Doc View Source

    PositionChangeStart

    Event emitted when the window position starts changing as a result of user interaction (resize or move).

    Declaration
    event EventHandler<WindowPositionChangedEventArgs> PositionChangeStart
    Event Type
    Type Description
    System.EventHandler<WindowPositionChangedEventArgs>
    | Improve this Doc View Source

    Removed

    The window was removed from the workspace. IsAlive is likely to be false.

    Declaration
    event EventHandler<WindowChangedEventArgs> Removed
    Event Type
    Type Description
    System.EventHandler<WindowChangedEventArgs>
    | Improve this Doc View Source

    StateChanged

    The state of the window has changed.

    Declaration
    event EventHandler<WindowStateChangedEventArgs> StateChanged
    Event Type
    Type Description
    System.EventHandler<WindowStateChangedEventArgs>
    | Improve this Doc View Source

    TitleChanged

    The title of the window has changed.

    Declaration
    event EventHandler<WindowTitleChangedEventArgs> TitleChanged
    Event Type
    Type Description
    System.EventHandler<WindowTitleChangedEventArgs>
    | Improve this Doc View Source

    TopmostChanged

    The IsTopmost property of the window has changed.

    Declaration
    event EventHandler<WindowTopmostChangedEventArgs> TopmostChanged
    Event Type
    Type Description
    System.EventHandler<WindowTopmostChangedEventArgs>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX