microsoft / microsoft/WPF-Samples
A window cannot go full screen properly across multiple screens
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.7k
- Forks
- 3.3k
- Avg merge
- 12d 8h
- Merged PRs (30d)
- 2
Description
Here is my code. I want a window to be full screen across multiple screens, but I found that when I use the following screen arrangement and scaling, it doesn't work correctly。
public MainWindow()
{
InitializeComponent();
Width = SystemParameters.VirtualScreenWidth;
Height = SystemParameters.VirtualScreenHeight;
Left = SystemParameters.VirtualScreenLeft;
Top = SystemParameters.VirtualScreenTop;
Console.WriteLine($"Left:{Left},Top:{Top},Width:{Width},Height:{Height}");
}
My project has PerMonitorV2 DPI awareness enabled and My project use .netframework 4.8.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MainWindow constructor and its SystemParameters.VirtualScreenWidth, VirtualScreenHeight, VirtualScreenLeft, and VirtualScreenTop usage. Reproduce the reported monitor arrangement with PerMonitorV2 DPI awareness on .NET Framework 4.8, then verify that the resulting window covers the intended virtual screen area correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100