Skip to content

[WinForms] Control.DefaultFont changed #14143

Closed

Description

@RussKie

Control.DefaultFont changed

See Control.DefaultFont changed to Segoe UI 9pt for updated documentation for this change.

Control.DefaultFont changed to Segoe UI 9pt to align with Windows UX guidelines.

Version introduced

3.0 Preview7

Old behavior

Control.DefaultFont was set to Microsoft Sans Serif 8pt.

New behavior

Control.DefaultFont is now set to Segoe UI 9pt (the same as SystemFonts.MessageBoxFont).

As a result of the change forms and controls will be sized about 27% larger to account for the larger size of the new default font.
image

Reason for change

To align with Windows UX guidelines this change ensures Segoe UI is used by default on Windows Vista and later, while still not breaking compatibility with Windows XP or systems compatible with it.

Recommended action

Ensure your application renders correctly.

To retain the original font, set your form's default font to Microsoft Sans Serif 8pt:

public MyForm()
{
    InitializeComponent();
    Font = new Font(new FontFamily("Microsoft Sans Serif"), 8f);
}

Category

  • Windows Forms

Affected APIs

Not detectable via API analysis


Issue metadata

  • Issue type: breaking-change

Activity

  1. added
    breaking-change
    ⌚ Not Triaged
    on Sep 2, 2019
  2. RussKie commented on Sep 2, 2019

    @RussKie
    ContributorAuthor
  3. changed the title [-][WinForms] `Control.Defaultfont` changed[/-] [+][WinForms] `Control.DefaultFont` changed[/+] on Sep 2, 2019
  4. RussKie commented on Sep 10, 2019

    @RussKie
    ContributorAuthor

    Yes, the doc must be updated as per the above.

  5. rpetrusha commented on Sep 12, 2019

    @rpetrusha
    Contributor

    Was this change introduced in a particular preview version, @RussKie?

  6. RussKie commented on Sep 13, 2019

    @RussKie
    ContributorAuthor

    Was this change introduced in a particular preview version

    It was shipped in Preview 7

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

    breaking-change

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions