Class InteropWindowQuery
Query for native windows
Inheritance
Namespace: Dapplo.Windows.Desktop
Assembly: Dapplo.Windows.dll
Syntax
public static class InteropWindowQuery : object
Properties
| Improve this Doc View SourceIgnoreClasses
Window classes which can be ignored
Declaration
public static IList<string> IgnoreClasses { get; }
Property Value
Type | Description |
---|---|
IList<System.String> |
Methods
| Improve this Doc View SourceGetActiveWindow()
Get the currently active window
Declaration
public static IInteropWindow GetActiveWindow()
Returns
Type | Description |
---|---|
IInteropWindow | InteropWindow |
GetDesktopWindow()
Gets the Desktop window
Declaration
public static IInteropWindow GetDesktopWindow()
Returns
Type | Description |
---|---|
IInteropWindow | InteropWindow for the desktop window |
GetLinkedWindows(IInteropWindow)
Find windows belonging to the same process (thread) as the supplied window.
Declaration
public static IEnumerable<IInteropWindow> GetLinkedWindows(this IInteropWindow windowToLinkTo)
Parameters
Type | Name | Description |
---|---|---|
IInteropWindow | windowToLinkTo | InteropWindow |
Returns
Type | Description |
---|---|
IEnumerable<IInteropWindow> | IEnumerable with InteropWindow |
GetTopLevelWindows(Boolean)
Iterate the Top level windows, from top to bottom
Declaration
public static IEnumerable<IInteropWindow> GetTopLevelWindows(bool ignoreKnownClasses = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | ignoreKnownClasses | true to ignore windows with certain known classes |
Returns
Type | Description |
---|---|
IEnumerable<IInteropWindow> | IEnumerable with all the top level windows |
GetTopWindows(IInteropWindow)
Iterate the windows, from top to bottom
Declaration
public static IEnumerable<IInteropWindow> GetTopWindows(IInteropWindow parent = null)
Parameters
Type | Name | Description |
---|---|---|
IInteropWindow | parent | InteropWindow as the parent, to iterate over the children, or null for all |
Returns
Type | Description |
---|---|
IEnumerable<IInteropWindow> | IEnumerable with all the top level windows |
IsTopLevel(IInteropWindow, Boolean)
Check if the window is a top level window. This method will retrieve all information, and fill it to the interopWindow, it needs to make the decision.
Declaration
public static bool IsTopLevel(this IInteropWindow interopWindow, bool ignoreKnowClasses = true)
Parameters
Type | Name | Description |
---|---|---|
IInteropWindow | interopWindow | InteropWindow |
System.Boolean | ignoreKnowClasses | true (default) to ignore classes from the IgnoreClasses list |
Returns
Type | Description |
---|---|
System.Boolean | bool |