You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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);
}
Activity
RussKie commentedon Sep 2, 2019
/cc: @OliaG @merriemcgaw
[-][WinForms] `Control.Defaultfont` changed[/-][+][WinForms] `Control.DefaultFont` changed[/+]mairaw commentedon Sep 9, 2019
We also need to review this for this breaking change: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control.defaultfont#remarks
RussKie commentedon Sep 10, 2019
Yes, the doc must be updated as per the above.
rpetrusha commentedon Sep 12, 2019
Was this change introduced in a particular preview version, @RussKie?
RussKie commentedon Sep 13, 2019
It was shipped in Preview 7