dotnet / dotnet/wpf

WPF WindowFormsHost RichTextBox ForeColor issue

Open
#9,635 11 comments 0 reactions 1 assignee Claimed by @harshit7962 View on GitHub
Bug Investigate Win 11 Theming
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

![screenshot](https://github.com/user-attachments/assets/5605632d-96fd-4f21-8ab5-89a0a01edb57)
![screenshot1](https://github.com/user-attachments/assets/a72e935b-74c5-47f6-aaf6-f17966032596)
The forecolor and the back color comes out wrong on run. Please solve this issue. WPF WindowFormHost ForeColour Issue

### Reproduction Steps

I have attached a zip here:
[Error.zip](https://github.com/user-attachments/files/16728537/Error.zip)

### Expected behavior

It comes out as a transparenty color instead of the ordinary black.

### Actual behavior

It's meant to come out as black

### Regression?

It used to work in .net 8 before I switched to .net 9.

### Known Workarounds

Using the WPF richtextbox(formatting controls such as backcolor, selectionfont not availiable)

### Impact

Prevention of usage of richtextbox

### Configuration

.net 9
windows 10.10.0.17763.0
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.