diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs index 3b7bdb5160c..20e389d9a8d 100644 --- a/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs +++ b/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs @@ -2274,7 +2274,7 @@ public static Font DefaultFont { if (defaultFont == null) { - defaultFont = SystemFonts.DefaultFont; + defaultFont = SystemFonts.MessageBoxFont; Debug.Assert(defaultFont != null, "defaultFont wasn't set!"); } diff --git a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ComboBoxTests.cs b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ComboBoxTests.cs index 74cea883371..254dc4f1e43 100644 --- a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ComboBoxTests.cs +++ b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ComboBoxTests.cs @@ -375,7 +375,7 @@ public void Font_SetWithHandler_CallsFontChanged() control.FontChanged += handler; // Set different. - Font font1 = SystemFonts.MenuFont; + Font font1 = new Font("Arial", 8.25f); control.Font = font1; Assert.Same(font1, control.Font); Assert.Equal(1, callCount); diff --git a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/DataGridViewRowTests.cs b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/DataGridViewRowTests.cs index 366bf1216a4..7debec4462a 100644 --- a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/DataGridViewRowTests.cs +++ b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/DataGridViewRowTests.cs @@ -948,7 +948,7 @@ public static IEnumerable Height_NeedsHeightInfo_TestData() ColumnCount = 1, AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells }, - 22, 0, 22 + 25, 0, 25 }; yield return new object[] { new DataGridView { ColumnCount = 1, VirtualMode = true }, 6, 1, 5 }; diff --git a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ListBoxTests.cs b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ListBoxTests.cs index 185cadf17bb..6a1388150dd 100644 --- a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ListBoxTests.cs +++ b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ListBoxTests.cs @@ -376,7 +376,7 @@ public void Font_SetWithHandler_CallsFontChanged() control.FontChanged += handler; // Set different. - Font font1 = SystemFonts.MenuFont; + Font font1 = new Font("Arial", 8.25f); control.Font = font1; Assert.Same(font1, control.Font); Assert.Equal(1, callCount);