HandyOrg / HandyOrg/HandyControl
Window expaneded outside screen when maxmized
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
多屏时(单个屏幕也没法观察到),某些屏幕布局下,窗口最大化时会超出屏幕范围,在另外的显示上显示一个白边。

在另一个上:

我本地测试的:

截屏的位置:

两个同分辨率的屏幕水平放置似乎没有这个现象。 测试过HandyControlDemo的主窗口也是一样的效果。
Steps to reproduce the bug
NA
Expected behavior
No response
Screenshots
No response
NuGet package version
No response
IDE
Visual Studio 2022
Framework type
.Net Framework 4.7.2
Windows version
Windows 11 (22000)
Additional context
做了一些时间调试,发现在这里可能有些问题。
如果任务栏没有设置自动隐藏,就不会执行里面的限制窗口大小的代码。将 if (autoHide) 注释掉就会正常。
另外去掉autoHide判断,也不影响任务栏自动隐藏情况下的使用。
将截图里全掉的部分注释后表现正常了。

因为我本身对这个不是很懂,请大佬酌情参考处理。
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 by reading src/Shared/HandyControl_Shared/Controls/Window/Window.cs around line 336, especially the auto-hide condition and the window-size limiting logic. Reproduce the issue with multiple monitors and different layouts, then verify that a maximized window remains within the screen while taskbar auto-hide behavior still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100