111 references to DefaultFont
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
HasValidFonts.vb (1)
17Dim result = SystemFonts.DefaultFont
System.Drawing.Common.Tests (6)
System\Drawing\FontTests.cs (4)
717Assert.Equal(SystemFonts.DefaultFont.GdiCharSet <= 2 ? font.GdiCharSet : SystemFonts.DefaultFont.GdiCharSet, logFont.lfCharSet); 751Assert.Equal(SystemFonts.DefaultFont.GdiCharSet <= 2 ? font.GdiCharSet : SystemFonts.DefaultFont.GdiCharSet, logFont.lfCharSet);
System\Drawing\GraphicsTests.cs (2)
2784graphics.DrawString("Test text", SystemFonts.DefaultFont, Brushes.White, default(Point)); 2796() => graphics.DrawString("Test text", SystemFonts.DefaultFont, Brushes.White, default(Point)));
System.Windows.Forms (1)
System\Windows\Forms\Help\Help.cs (1)
88Font font = SystemFonts.StatusFont ?? SystemFonts.DefaultFont;
System.Windows.Forms.Tests (103)
System\Windows\Forms\CheckBoxRendererTests.cs (7)
33CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.DefaultFont, false, cBState); 70CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.DefaultFont, false, cBState); 80State.FontFace(SystemFonts.DefaultFont.Name) 107CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.DefaultFont, textFormat, false, cBState); 117State.FontFace(SystemFonts.DefaultFont.Name) 141CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.DefaultFont, TextFormatFlags.Default, focus, cBState, HWND.Null); 151State.FontFace(SystemFonts.DefaultFont.Name)
System\Windows\Forms\DataGridViewCellStyleTests.cs (16)
47Font = SystemFonts.DefaultFont, 64Assert.Equal(SystemFonts.DefaultFont, style.Font); 262yield return new object[] { SystemFonts.DefaultFont }; 285Font = SystemFonts.DefaultFont 624Font = SystemFonts.DefaultFont, 642Assert.Equal(SystemFonts.DefaultFont, style.Font); 667Font = SystemFonts.DefaultFont, 684Assert.Equal(SystemFonts.DefaultFont, style.Font); 715Font = SystemFonts.DefaultFont, 732Assert.Equal(SystemFonts.DefaultFont, style.Font); 781Font = SystemFonts.DefaultFont, 798Assert.Equal(SystemFonts.DefaultFont, style.Font); 840Font font = SystemFonts.DefaultFont; 1072new DataGridViewCellStyle { Font = SystemFonts.DefaultFont }, 1073$"DataGridViewCellStyle {{ Font={SystemFonts.DefaultFont} }}" 1121Font font = SystemFonts.DefaultFont;
System\Windows\Forms\DataGridViewCellTests.cs (24)
5256int height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.DefaultFont, 10, TextFormatFlags.Default); 5259height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.DefaultFont, 10, TextFormatFlags.Default, out bool widthTruncated); 5271int height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.DefaultFont, 20, TextFormatFlags.Default); 5274height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.DefaultFont, 20, TextFormatFlags.Default, out bool widthTruncated); 5283Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default)); 5284Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default, out widthTruncated)); 5307Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, maxWidth, TextFormatFlags.Default)); 5308Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, maxWidth, TextFormatFlags.Default, out widthTruncated)); 5319Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags)); 5320Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags, out widthTruncated)); 5330Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text, SystemFonts.DefaultFont, 0.2f, TextFormatFlags.Default)); 5344Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text, SystemFonts.DefaultFont, 0.2f, flags)); 5350Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextPreferredSize(null, "text", SystemFonts.DefaultFont, 0.2f, TextFormatFlags.Default)); 5368Assert.Throws<ArgumentOutOfRangeException>("maxRatio", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.DefaultFont, maxRatio, TextFormatFlags.Default)); 5377Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.DefaultFont, 0.2f, flags)); 5386Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text, SystemFonts.DefaultFont, TextFormatFlags.Default)); 5400Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text, SystemFonts.DefaultFont, flags)); 5406Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextSize(null, "text", SystemFonts.DefaultFont, TextFormatFlags.Default)); 5423Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextSize(graphics, "text", SystemFonts.DefaultFont, flags)); 5432Assert.Equal(0, DataGridViewCell.MeasureTextWidth(graphics, text, SystemFonts.DefaultFont, 10, TextFormatFlags.Default)); 5446Assert.NotEqual(0, DataGridViewCell.MeasureTextWidth(graphics, text, SystemFonts.DefaultFont, 10, flags)); 5452Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextWidth(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default)); 5470Assert.Throws<ArgumentOutOfRangeException>("maxHeight", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.DefaultFont, maxHeight, TextFormatFlags.Default)); 5479Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.DefaultFont, 10, flags));
System\Windows\Forms\DataGridViewRowTests.cs (1)
2058Font font1 = SystemFonts.DefaultFont;
System\Windows\Forms\DrawItemEventArgsTests.cs (12)
16yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, SystemColors.WindowText, SystemColors.Window }; 17yield return new object[] { SystemFonts.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, SystemColors.HighlightText, SystemColors.Highlight }; 18yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, SystemColors.WindowText, SystemColors.Window }; 19yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, SystemColors.WindowText, SystemColors.Window }; 41yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, Color.Red, Color.Blue }; 42yield return new object[] { SystemFonts.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, Color.Red, Color.Blue }; 43yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, Color.Red, Color.Blue }; 44yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, Color.Red, Color.Blue }; 67Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None)); 68Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None, Color.Red, Color.Blue)); 93DrawItemEventArgs e = new(graphics, SystemFonts.DefaultFont, bounds, -1, state); 103DrawItemEventArgs e = new(graphics, SystemFonts.DefaultFont, bounds, -1, state);
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (11)
16yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 17yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 18yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 42Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont)); 51DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont) 68yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 69yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 70yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 92DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header, ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont); 101DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont); 108yield return new object[] { new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont };
System\Windows\Forms\DrawToolTipEventArgsTests.cs (5)
16yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(1, 2, 3, 4), "", Color.Red, Color.Blue, SystemFonts.DefaultFont }; 17yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(-1, -2, -3, -4), "toolTipText", Color.Red, Color.Blue, SystemFonts.DefaultFont }; 40yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), null, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 41yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), string.Empty, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 42yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), "tooltipText", Color.Red, Color.Blue, SystemFonts.DefaultFont };
System\Windows\Forms\RadioButtonRendererTests.cs (5)
65RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text, SystemFonts.DefaultFont, false, rBState); 75State.FontFace(SystemFonts.DefaultFont.Name) 102RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text, SystemFonts.DefaultFont, textFormat, false, rBState); 134SystemFonts.DefaultFont, 149State.FontFace(SystemFonts.DefaultFont.Name)
System\Windows\Forms\TextBoxRendererTests.cs (4)
69TextBoxRenderer.DrawTextBox(graphics, bounds, "text", SystemFonts.DefaultFont, tBState); 81State.FontFace(SystemFonts.DefaultFont.Name) 105TextBoxRenderer.DrawTextBox(graphics, bounds, "text", SystemFonts.DefaultFont, textBounds, tBState); 117State.FontFace(SystemFonts.DefaultFont.Name)
System\Windows\Forms\TextRendererTests.cs (10)
584State.FontFace(SystemFonts.DefaultFont.Name), 593TextRenderer.DrawText(context, "Acrylic", SystemFonts.DefaultFont, 678SystemFonts.DefaultFont, 688State.FontFace(SystemFonts.DefaultFont.Name), 701SystemFonts.DefaultFont, 711State.FontFace(SystemFonts.DefaultFont.Name), 732SystemFonts.DefaultFont, 771SystemFonts.DefaultFont, 787State.FontFace(SystemFonts.DefaultFont.Name), 819SystemFonts.DefaultFont,
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (8)
15yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Top }; 16yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Bottom }; 40yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.MiddleCenter, TextFormatFlags.Default | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix }; 41yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.BottomRight, TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.HidePrefix }; 42yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, (ContentAlignment)(-1), TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.RightToLeft | TextFormatFlags.HidePrefix }; 68Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Top)); 69Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.TopLeft)); 84ToolStripItemTextRenderEventArgs e = new(graphics, new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Blue, SystemFonts.DefaultFont, TextFormatFlags.Top)