microsoft / microsoft/WPF-Samples

A window cannot go full screen properly across multiple screens

Open
#665 1 comment 0 reactions 0 assignees View on GitHub

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。
Image

    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}");
    }

Image

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.