Skip to content

Commit

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

This page is about the `WindowInfo` class available in [`PeyrSharp.UiHelpers`](../ui-helpers.md).
It represents information about a window.

## Compatibility

The `WindowInfo` class is part of the `PeyrSharp.UiHelpers` module, and is compatible with all of these frameworks and platforms:

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

::: warning
Some methods, classes or features of `PeyrSharp.UiHelpers` might not be available in all platforms.
:::

## Properties

### Handle

#### Definition

```c#
public IntPtr Handle { get; set; }
```

Gets or sets the handle of the window.

#### Usage

```c#
// Create a new WindowInfo object
WindowInfo windowInfo = windowInfos[0]; // Assuming you have used the GetWindows() method.
// Get the handle of the window
Console.WriteLine(windowInfo.Handle); // Output: 123456
```

### Name

#### Definition

```c#
public string Name { get; set; }
```

Gets or sets the name of the window.

#### Usage

```c#
// Create a new WindowInfo object
WindowInfo windowInfo = new WindowInfo();

// Set the name of the window
windowInfo.Name = "MyWindow";

// Get the name of the window
Console.WriteLine(windowInfo.Name); // Output: MyWindow
```

### ClassName

#### Definition

```c#
public string ClassName { get; set; }
```

Gets or sets the class name of the window.

#### Usage

```c#
// Create a new WindowInfo object
WindowInfo windowInfo = new WindowInfo();

// Set the class name of the window
windowInfo.ClassName = "MyWindowClass";

// Get the class name of the window
Console.WriteLine(windowInfo.ClassName); // Output: MyWindowClass
```

0 comments on commit cce3d05

Please sign in to comment.