Skip to content

[Dark Mode] There not enough space between the borderline and text for Button control when setting the TextAlign as MiddleLeft/MiddleRight #14223

@Zheng-Li01

Description

@Zheng-Li01

.NET version

.NET SDK 11.0.0-preview.1.26069.103

Did it work in .NET Framework?

Not tested/verified

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

The issue can reproduce .NET SDK 10.0, not reproduce on .NET 9.0

Issue description

There not enough space between the borderline and text for Button control when setting the TextAlign as MiddleLeft/MiddleRight in DarkMode

Image

.NET SDK 11.0 Results:

11Results.mp4

.NET SDK 9.0 Results:

90Results.mp4

Classic Mode Results:

Classlic.mp4

Steps to reproduce

  1. Create a .NET winforms project with Button & PropertyGrid controls
  2. Select the buttton1 as object for the propertyGrid1
  3. Set app under Dark mode in program.cs file
    Application.SetColorMode(SystemColorMode.Dark);
  4. Run the application
  5. Set the TextAlign property as MiddleLeft/MiddleRight

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions