C# Класс Catel.Windows.WindowExtensions

Extensions for System.Windows.Window.
Показать файл Открыть проект

Открытые методы

Метод Описание
ApplyIconFromApplication ( this window ) : void

Applies the icon from the entry assembly (the application) to the window.

BringWindowToTop ( this window ) : void

Brings to specified window to top.

GetWindowHandle ( this window ) : IntPtr

Gets the window handle of the specified window.

RemoveIcon ( this window ) : void

Removes the icon from the window.

SetOwnerWindow ( this window, IntPtr owner, bool forceNewOwner = false ) : void

Sets the owner window of a specific window via the window handle.

SetOwnerWindow ( this window, Window owner, bool forceNewOwner = false ) : void

Sets the owner window of a specific window via the Window class.

SetOwnerWindow ( this window, bool forceNewOwner = false, bool focusFirstControl = false ) : void

Sets the owner window to the main window of the current process.

SetOwnerWindowAndFocus ( this window, IntPtr owner, bool forceNewOwner = false ) : void

Sets the owner window of a specific window via the window handle, but also sets the focus on the first control.

SetOwnerWindowAndFocus ( this window, Window owner, bool forceNewOwner = false ) : void

Sets the owner window of a specific window via the Window class, but also sets the focus on the first control.

SetOwnerWindowAndFocus ( this window, bool forceNewOwner = false ) : void

Sets the owner window to the main window of the current process, but also sets the focus on the first control.

Приватные методы

Метод Описание
BringWindowToTop ( IntPtr hWnd ) : bool
GetProcessMainWindowHandle ( ) : IntPtr

Returns the main window handle of the current process.

GetWindowLong ( IntPtr hWnd, int nIndex ) : int
GetWindowRect ( IntPtr hWnd, RECT &lpRect ) : bool
HasOwner ( Window window ) : bool

Returns whether the window currently has an owner.

SendMessage ( IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam ) : IntPtr
SetOwnerWindow ( Window window, Window ownerWindow, IntPtr ownerHandle, bool forceNewOwner, bool focusFirstControl ) : void

Sets the owner window of a specific window. It will first try to set the owner via the ownerWindow. If the ownerWindow is not available, this method will use the ownerHandle to set the parent.

SetOwnerWindowByHandle ( Window window, IntPtr owner, bool forceNewOwner = false, bool focusFirstControl = true ) : void

Sets the owner window of a specific window via the window handle.

SetOwnerWindowByWindow ( Window window, Window owner, bool forceNewOwner = false, bool focusFirstControl = true ) : void

Sets the owner window of a specific window.

SetWindowLong ( IntPtr hWnd, int nIndex, int dwNewLong ) : int
SetWindowPos ( IntPtr hwnd, IntPtr hwndInsertAfter, int x, int y, int width, int height, uint flags ) : bool

Описание методов

ApplyIconFromApplication() публичный статический Метод

Applies the icon from the entry assembly (the application) to the window.
public static ApplyIconFromApplication ( this window ) : void
window this The window.
Результат void

BringWindowToTop() публичный статический Метод

Brings to specified window to top.
The is null.
public static BringWindowToTop ( this window ) : void
window this The window to bring to top.
Результат void

GetWindowHandle() публичный статический Метод

Gets the window handle of the specified window.
public static GetWindowHandle ( this window ) : IntPtr
window this The window.
Результат System.IntPtr

RemoveIcon() публичный статический Метод

Removes the icon from the window.
public static RemoveIcon ( this window ) : void
window this The window.
Результат void

SetOwnerWindow() публичный статический Метод

Sets the owner window of a specific window via the window handle.
public static SetOwnerWindow ( this window, IntPtr owner, bool forceNewOwner = false ) : void
window this Reference to the current window.
owner System.IntPtr New owner window.
forceNewOwner bool If true, the new owner will be forced. Otherwise, if the /// window currently has an owner, that owner will be respected (and thus not changed).
Результат void

SetOwnerWindow() публичный статический Метод

Sets the owner window of a specific window via the Window class.
public static SetOwnerWindow ( this window, Window owner, bool forceNewOwner = false ) : void
window this Reference to the current window.
owner System.Windows.Window New owner window.
forceNewOwner bool If true, the new owner will be forced. Otherwise, if the /// window currently has an owner, that owner will be respected (and thus not changed).
Результат void

SetOwnerWindow() публичный статический Метод

Sets the owner window to the main window of the current process.
public static SetOwnerWindow ( this window, bool forceNewOwner = false, bool focusFirstControl = false ) : void
window this Reference to the current window.
forceNewOwner bool If true, the new owner will be forced. Otherwise, if the /// window currently has an owner, that owner will be respected (and thus not changed).
focusFirstControl bool If true, the first control will automatically be focused.
Результат void

SetOwnerWindowAndFocus() публичный статический Метод

Sets the owner window of a specific window via the window handle, but also sets the focus on the first control.
public static SetOwnerWindowAndFocus ( this window, IntPtr owner, bool forceNewOwner = false ) : void
window this Reference to the current window.
owner System.IntPtr New owner window.
forceNewOwner bool If true, the new owner will be forced. Otherwise, if the /// window currently has an owner, that owner will be respected (and thus not changed).
Результат void

SetOwnerWindowAndFocus() публичный статический Метод

Sets the owner window of a specific window via the Window class, but also sets the focus on the first control.
public static SetOwnerWindowAndFocus ( this window, Window owner, bool forceNewOwner = false ) : void
window this Reference to the current window.
owner System.Windows.Window New owner window.
forceNewOwner bool If true, the new owner will be forced. Otherwise, if the /// window currently has an owner, that owner will be respected (and thus not changed).
Результат void

SetOwnerWindowAndFocus() публичный статический Метод

Sets the owner window to the main window of the current process, but also sets the focus on the first control.
public static SetOwnerWindowAndFocus ( this window, bool forceNewOwner = false ) : void
window this Reference to the current window.
forceNewOwner bool If true, the new owner will be forced. Otherwise, if the /// window currently has an owner, that owner will be respected (and thus not changed).
Результат void