Skip to content

Commit

Permalink
Added WindowHelpers page
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Aug 31, 2023
1 parent cce3d05 commit b0d2e87
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Documentation/ui-helpers/windowhelpers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# WindowHelpers

This page is about the `WindowHelpers` class available in [`PeyrSharp.UiHelpers`](../ui-helpers.md). This page is about all of its methods.

## Compatibility

WindowHelpers are part of the `PeyrSharp.UiHelpers` module, which is compatible with all of these frameworks and platforms:

| Package/Platform | Windows | macOS | Linux + others |
| ---------------- | ---------- | ---------- | -------------- |
| UiHelpers ||||
| **Framework** | **.NET 5** | **.NET 6** | **.NET 7** |
| UiHelpers ||||

## Methods

### GetWindows()

#### Definition

Retrieves a list of currently visible windows.

#### Returns

A list of `WindowInfo` objects representing the visible windows.

#### Usage

```c#
using PeyrSharp.UiHelpers;
using System.Collections.Generic;

public class MyWindowManager
{
public void PrintOpenedWindows() {
List<WindowInfo> windows = WinFormsHelpers.GetWindows();
foreach (WindowInfo window in windows)
{
Console.WriteLine(window.Name);
}
}
}
```

0 comments on commit b0d2e87

Please sign in to comment.