HandyOrg / HandyOrg/HandyControl

HandyControl的窗口控件最下面会有大概1像素左右的白色边框,请问怎么去掉这白线?

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

Nobody has claimed this yet.

Dominant language
C#
Stars
7.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

使用hc:Window来作为窗口控件并自定义NonClientArea背景色。
image
如图所示,窗口最下面的边框是白色的,其他三面的边框是深色的。在vs的设计器中看不到这一现象,但生成后运行就会出现。
尝试过:

  • blackground="Black"-无变化,无效
  • BorderBrush="Black"-无变化,无效
  • BorderThickness="0"-无变化,无效
  • 删除NonClientArea相关属性配置-无变化,无效
  • 将hc:Window换成wpf原生window-白线消失,有效

请问如何解决这一问题?
我观察到,源代码中提供的示例也有这条白线存在:
image
请注意背景图案与边框间的白线。

我使用的是Nuget上的3.1版本,使用HandyControl的默认样式,
环境为
Windows 10 20H2
.net 5.0.201
vs 2019 社区版

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

Reproduce the issue with hc:Window, the custom NonClientArea background, and the stated Windows/.NET environment, then compare it with a native WPF Window. Inspect HandyControl's default window styling and NonClientArea rendering to identify the source of the bottom white line; done means the custom window has consistent dark borders on all sides.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.