dotnet / dotnet/wpf

Add support for Windows 11 "Snap Layout" to the custom title bar (WindowChrome)

Open
#4,825 66 comments 30 reactions 0 assignees View on GitHub
Feature Request
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

As Windows 11 introduce **Snap Layout** when we hover on Restore/Maximize caption button, I want to have this feature on my custom title bar using `WindowChrome`.

The current `SystemCommands` class does not have it:
```cs
public static class SystemCommands
{
public static void CloseWindow(Window window);
public static void MaximizeWindow(Window window);
public static void MinimizeWindow(Window window);
public static void RestoreWindow(Window window);
public static void ShowSystemMenu(Window window, Point screenLocation);
}
```

### Custom Title bar
![image](https://user-images.githubusercontent.com/3154213/125071292-aed40900-e0eb-11eb-9953-1305c79fa393.png)

### Default Title bar
![image](https://user-images.githubusercontent.com/3154213/125071422-d4611280-e0eb-11eb-8300-3ea3dc36e947.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.