dotnet / dotnet/wpf

When IsInactiveSelectionHighlightEnabled is turned on, then scrolling has visual defect

Open
#1,698 0 comments 1 reaction 0 assignees View on GitHub
.NET Framework Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Version: 4.5.1
* Windows version: 10
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Don't know



**Problem description:**
See title. Visual defect is that characters look different than they should - some are gray (like highlighted), some are not - see attached picture.

**Expected behavior:**
There are no strange visual effects and all characters look the same.

**Minimal repro:**
Setup: I have _RichTextBox_ with _IsInactiveSelectionHighlightEnabled = true_. Inside is a longer text that needs scrollbar.

1. Select all text.
2. Click outside text box to lose focus.
3. Text is still highlighted as expected with light gray.
4. When scrolling text box there is strange visual defect, some characters are light gray as they should be, but some characters are not and are black.

StackOverflow links with similar problem:
[StackOverflow1](https://stackoverflow.com/questions/34248394/wpf-bug-in-flowdocumentscrollviewer-isinactiveselectionhighlightenabled)
[StackOverflow2](https://stackoverflow.com/questions/54973499/in-a-wpf-textbox-why-does-an-inactive-selection-appear-incorrectly-when-scrolli)

Screenshot: ![fed-bug](https://user-images.githubusercontent.com/45784262/63489526-a8febb80-c4b2-11e9-8c88-aca0756bd169.png)

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.