dotnet / dotnet/wpf

Inconsistent border color rendering with black Background and BorderBrush.

Open
#9,107 3 comments 0 reactions 0 assignees View on GitHub
Investigate
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

When setting both the Background and BorderBrush colors to black within a border element, an unexpected behavior occurs where an inner border in gray appears only on the top and bottom sides. This inconsistency in border color rendering contradicts the expected behavior and may lead to visual discrepancies in UI design.

### Reproduction Steps

- Download the sample attached.
- Run the sample.
- Observe the presence of the gray border color.

Issue Screenshot:

![image](https://github.com/dotnet/wpf/assets/102579588/80af6b29-a223-43a7-af9a-80931f5e2860)

[WPFDemo.zip](https://github.com/dotnet/wpf/files/15320271/WPFDemo.zip)

### Expected behavior

The gray border color should not be displayed.

### Actual behavior

The gray border color is displayed.

### Regression?

_No response_

### Known Workarounds

_No response_

### Impact

_No response_

### Configuration

_No response_

### Other information

_No response_

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.