Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

Underscore characters ("_") were invisible when TextBox had focus, appearing only after focus was lost. This occurred because ScrollContentPresenter inherited RecognizesAccessKey="True", causing underscores to be interpreted as AccessKey mnemonics.

Changes

  • Set RecognizesAccessKey="False" on ScrollContentPresenter in TextControlContentHostStyle
    • Fixes TextBox, PasswordBox, RichTextBox
  • Set RecognizesAccessKey="False" on ScrollContentPresenter in ScrollViewerScrollBarlessTemplate
    • Fixes TabControl and Pivot headers

Example

Before: Type test_underscore in TextBox → underscores hidden while focused
After: Type test_underscore in TextBox → underscores visible at all times

<ScrollContentPresenter
    x:Name="PART_ScrollContentPresenter"
    Content="{TemplateBinding Content}"
    RecognizesAccessKey="False" />
Original prompt

This section details on the original issue you should resolve

<issue_title>"_" cannot be rendered by Textbox when the cursor moves here.</issue_title>
<issue_description>### Describe the bug

As stated in the title, the underscore ("_") fails to render when the cursor is in the Textbox, but displays properly when the cursor leaves.

Reproduction

Image Image

Suggested Solution

[string empty](I don't know)

Library Version

0.10.2

Operating System

Windows 11

Framework

.NET Core and .NET

Framework Version

10.0

Source of Package

NuGet.org (Package)

Additional Notes

No response

Validations

  • Check that there isn't already an issue that reports the same or similar problem.
  • Check that this is a bug in the library that should be fixed, not a feature, also this is not about the documentation. (Or please choose the right repo and template.)
  • This is one single problem, or a few problems with the same cause. (If you want to report multiple problems, please create one issue for every single problem.)
  • You've checked that this problem still exists in the latest version. (Keep in mind that we don't provide any support for old versions.)
  • You know that we can't guarantee that we will satisfy your request. This is not really our duty to do everything anyone asks for. Also, you will treat our staff, contributors, and other users with respect and kindness.
  • You're sure there's something wrong with the library itself, not how you're using it. (If you are having issues using it and need help, please go to discussion.)</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Jan 9, 2026
Copilot AI and others added 2 commits January 9, 2026 06:22
Co-authored-by: NotYoojun <54567489+NotYoojun@users.noreply.github.com>
Co-authored-by: NotYoojun <54567489+NotYoojun@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix underscore rendering issue in Textbox Fix underscore character not rendering in focused TextBox Jan 9, 2026
Copilot AI requested a review from NotYoojun January 9, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"_" cannot be rendered by Textbox when the cursor moves here.

2 participants