Skip to content

RichTextBox/TextBox scrollbar is rendered incorrectly after changing DPI #15129

Description

@Olina-Zhang

.NET version

.NET 11 RC2 build + integration/11.0-RC2 branch of Winforms repo

Did it work in .NET Framework?

Not tested/verified

Did it work in any of the earlier releases of .NET Core or .NET 5+?

NET11 new APIs

Issue description

When a WinForms application using VisualStylesMode.Net11, the RichTextBox vertical scrollbar is not rendered correctly after the DPI change.

The RichTextBox itself scales to the new DPI, but the vertical scrollbar does not appear to scale/layout consistently with the control.

100%DPI ->200%DPI:

Image

200%DPI->100%DPI:

Image

Steps to reproduce

  1. Create a WinForms application targeting .NET 11.
  2. Set VisualStylesMode = VisualStylesMode.Net11.
  3. Add a RichTextBox and enter enough content to display the vertical scrollbar.
  4. Set PerMonitorV2
  5. Run the application, Move the application from one DPI to another DPI when DPI changed
  6. Observe the RichTextBox vertical scrollbar after the DPI change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    NewApi-Net11Tracks issues for public APIs targeted for .NET 11.untriagedThe team needs to look at this issue in the next triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions