Skip to content

DomainUpDown/NumericUpDown size and location cannot be restored after changing and resetting Font #15331

Closed

Description

@Olina-Zhang

.NET version

.NET 11 SDK build: 11.0.100

Did it work in .NET Framework?

Yes

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

No, also repro in .NET 8

Issue description

After changing and resetting the Form's Font, changing the Font of a DomainUpDown or NumericUpDown control causes the control's size and/or location to change unexpectedly in the WinForms Designer.

After resetting the control's Font, the control does not return to its original size and location. Using Undo also does not restore the original layout.

The issue reproduces with both DomainUpDown and NumericUpDown.

FontIssue.mp4

Steps to reproduce

  1. Create a WinForms application.
  2. Add a DomainUpDown and a NumericUpDown control to the Form.
  3. Change the Form's Font to a different font or font size.
  4. Reset the Form's Font.
  5. Change the Font of the DomainUpDown or NumericUpDown control.
  6. Observe the control's size and location.
  7. Reset the control's Font.
  8. Observe the control's size and location again.
  9. Use Undo to try to restore the previous layout.

Actual behavior
After changing the control's Font:

  • The control's width and/or location changes.
  • Resetting the control's Font does not restore the original size and location.
  • Using Undo does not restore the control to its original size and location.
    As a result, the control can remain incorrectly sized or positioned in the Designer even after the Font property has been reset.

Expected behavior
After resetting the control's Font, the control should return to the appropriate size and position based on the original font.
Undo should also restore the control's previous size and location.

Activity

  1. added
    untriaged
    on Oct 29, 2026
  2. self-assigned this
    on Nov 6, 2026
  3. added
    💥 regression-framework
    and removed
    untriaged
    on Nov 6, 2026
  4. added this to the 12.0-preview1 milestone on Nov 19, 2026
  5. Zheng-Li01 commented on Nov 19, 2026

    @Zheng-Li01
    Member

    Verified the issue with .NET 12.0.0-alpha.1.26568.110, the issue has been fixed as below screenshot.

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

Metadata

Metadata

Assignees

Labels

💥 regression-framework

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions