dotnet / dotnet/wpf

Adorner Initial Position Incorrect After Foreground Color Change

Open
#10,640 5 comments 1 reaction 1 assignee Claimed by @h3xds1nz View on GitHub
:construction: work in progress Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

The issue where the initial position of the adorner is not calculated correctly after modifying the foreground color of a batch of UI elements and adding adorners to them.

### Reproduction Steps

the issue source:
[adornerissue.zip](https://github.com/user-attachments/files/19445551/adornerissue.zip)

click the "Data" button
![Image](https://github.com/user-attachments/assets/da0fdb79-63be-46cb-84ca-95a80acf4f4b)

click the "No Issue" button, the result is correct.
![Image](https://github.com/user-attachments/assets/adc86c5f-0339-47ee-b7a3-6265a2b24847)

click the "data" button again, then click the "Issue" button.
![Image](https://github.com/user-attachments/assets/0315a334-48bc-4cb3-90e0-b0832524e076)

### Expected behavior

![Image](https://github.com/user-attachments/assets/adc86c5f-0339-47ee-b7a3-6265a2b24847)
with yellow color foreground

### Actual behavior

![Image](https://github.com/user-attachments/assets/0315a334-48bc-4cb3-90e0-b0832524e076)

### Regression?

_No response_

### Known Workarounds

_No response_

### Impact

_No response_

### Configuration

.net framework 4.8
win11 x64

### 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.