71 references to Italic
System.Drawing.Common.Tests (46)
System\Drawing\FontConverterTests.cs (5)
141{ new Font("Courier", 8.0f, FontStyle.Italic), 3 }, 160{ $"Courier New{Separator} 11 px{Separator} style=Bold{Separator} Italic", "Courier New", 11f, GraphicsUnit.Pixel, FontStyle.Bold | FontStyle.Italic }, 161{ $"Courier New{Separator} 11 px{Separator} style=Regular, Italic", "Courier New", 11f, GraphicsUnit.Pixel, FontStyle.Regular | FontStyle.Italic }, 162{ $"Courier New{Separator} 11 px{Separator} style=Bold{Separator} Italic{Separator} Strikeout", "Courier New", 11f, GraphicsUnit.Pixel, FontStyle.Bold | FontStyle.Italic | FontStyle.Strikeout }, 163{ $"Arial{Separator} 11 px{Separator} style=Bold, Italic, Strikeout", "Arial", 11f, GraphicsUnit.Pixel, FontStyle.Bold | FontStyle.Italic | FontStyle.Strikeout },
System\Drawing\FontFamilyTests.cs (6)
164yield return new object[] { FontStyle.Italic }; 196AssertExtensions.Throws<ArgumentException>(null, () => family.IsStyleAvailable(FontStyle.Italic)); 208AssertExtensions.Throws<ArgumentException>(null, () => family.GetEmHeight(FontStyle.Italic)); 249AssertExtensions.Throws<ArgumentException>(null, () => family.GetCellAscent(FontStyle.Italic)); 261AssertExtensions.Throws<ArgumentException>(null, () => family.GetCellDescent(FontStyle.Italic)); 273AssertExtensions.Throws<ArgumentException>(null, () => family.GetLineSpacing(FontStyle.Italic));
System\Drawing\FontTests.cs (35)
91yield return new object[] { FontFamily.GenericSerif, 2, FontStyle.Italic }; 173yield return new object[] { FontFamily.GenericSerif, 2, FontStyle.Italic, GraphicsUnit.Inch }; 215yield return new object[] { FontFamily.GenericSerif, 2, FontStyle.Italic, GraphicsUnit.Inch, 1 }; 257yield return new object[] { FontFamily.GenericSerif, 2, FontStyle.Italic, GraphicsUnit.Inch, 1, false }; 318using Font copy = new(font, FontStyle.Italic); 319Assert.Equal(FontStyle.Italic, copy.Style); 327AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic)); 329AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic, GraphicsUnit.Display)); 330AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic, GraphicsUnit.Display, 10)); 331AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic, GraphicsUnit.Display, 10, gdiVerticalFont: true)); 344AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic)); 346AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display)); 347AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display, 10)); 348AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display, 10, gdiVerticalFont: true)); 362AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic)); 363AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic)); 366AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document)); 367AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document)); 368AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document, 10)); 369AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10)); 370AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document, 10, gdiVerticalFont: true)); 371AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10, gdiVerticalFont: true)); 383AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit)); 384AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit)); 385AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit, 10)); 386AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10)); 387AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit, 10, gdiVerticalFont: true)); 388AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10, gdiVerticalFont: true)); 425yield return new object[] { font.Clone(), new Font(family, 10, FontStyle.Italic, GraphicsUnit.Millimeter, 10, gdiVerticalFont: true), false }; 563[InlineData(FontStyle.Strikeout | FontStyle.Underline | FontStyle.Italic, 549, 1)] 564[InlineData(FontStyle.Strikeout | FontStyle.Underline | FontStyle.Italic | FontStyle.Bold, 550, 1)] 565[InlineData(FontStyle.Strikeout | FontStyle.Underline | FontStyle.Bold | FontStyle.Italic, int.MaxValue, 1)] 579lfItalic = (fontStyle & FontStyle.Italic) != 0 ? (byte)1 : (byte)0, 699[InlineData(FontStyle.Strikeout | FontStyle.Bold | FontStyle.Italic, 255, true, "@", 700)] 863Assert.Equal((expectedStyle & FontStyle.Italic) != 0, font.Italic);
System.Windows.Forms (4)
System\Windows\Forms\ActiveX\AxHost.cs (1)
3775style |= FontStyle.Italic;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2189style |= FontStyle.Italic;
System\Windows\Forms\Rendering\FontCache.Data.cs (2)
95lfItalic = (font.Style & FontStyle.Italic) == FontStyle.Italic ? True : False,
System.Windows.Forms.Design (2)
System\Drawing\Design\FontNameEditor.cs (2)
18FontStyle.Italic, 20FontStyle.Bold | FontStyle.Italic
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\BaseContextMenuStripTests.cs (1)
21contextMenuStrip.Font = new Font("Times New Roman", 10.0f, FontStyle.Italic);
System.Windows.Forms.Tests (12)
System\Windows\Forms\AxHostTests.cs (2)
1475using Font font = new("Arial", 10, FontStyle.Bold | FontStyle.Underline | FontStyle.Italic | FontStyle.Strikeout, GraphicsUnit.Point, 10); 1544using Font font = new("Arial", 10, FontStyle.Bold | FontStyle.Underline | FontStyle.Italic | FontStyle.Strikeout, GraphicsUnit.Point, 10);
System\Windows\Forms\DataGridViewTests.cs (2)
2327using Font customFont2 = new("Consolas", 14F, FontStyle.Italic); 2369using Font formFont2 = new("Arial Black", 10F, FontStyle.Italic);
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
112using Font customColumnHeaderFont = new("Consolas", 14F, FontStyle.Italic);
System\Windows\Forms\RichTextBoxTests.cs (7)
1583yield return new object[] { "Arial", 8.25f, FontStyle.Italic, GraphicsUnit.Point, 1, 165, CFE_EFFECTS.CFE_ITALIC }; 1586yield return new object[] { "Arial", 8.25f, FontStyle.Bold | FontStyle.Italic | FontStyle.Regular | FontStyle.Strikeout | FontStyle.Underline, GraphicsUnit.Point, 10, 165, CFE_EFFECTS.CFE_BOLD | CFE_EFFECTS.CFE_ITALIC | CFE_EFFECTS.CFE_UNDERLINE | CFE_EFFECTS.CFE_STRIKEOUT }; 4717yield return new object[] { CFM_MASK.CFM_ITALIC, CFE_EFFECTS.CFE_ITALIC, 0, arial, "Arial", 13, FontStyle.Italic }; 4718yield return new object[] { CFM_MASK.CFM_ITALIC, CFE_EFFECTS.CFE_ITALIC | CFE_EFFECTS.CFE_ALLCAPS, 0, arial, "Arial", 13, FontStyle.Italic }; 4815yield return new object[] { "Arial", 8.25f, true, FontStyle.Bold | FontStyle.Italic | FontStyle.Regular | FontStyle.Strikeout | FontStyle.Underline, GraphicsUnit.Point, 10, 1 }; 4917yield return new object[] { new Font("Arial", 8.25f, FontStyle.Italic), 165, CFE_EFFECTS.CFE_ITALIC }; 4920yield return new object[] { new Font("Arial", 8.25f, FontStyle.Bold | FontStyle.Italic | FontStyle.Regular | FontStyle.Strikeout | FontStyle.Underline, GraphicsUnit.Point, 10), 165, CFE_EFFECTS.CFE_BOLD | CFE_EFFECTS.CFE_ITALIC | CFE_EFFECTS.CFE_UNDERLINE | CFE_EFFECTS.CFE_STRIKEOUT };
WindowsFormsIntegration (2)
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (2)
167style = SD.FontStyle.Italic; 349style = SD.FontStyle.Italic;
WinFormsControlsTest (4)
DataGridViewTest.cs (1)
14new Font("Consolas", 14F, FontStyle.Italic),
DataGridViewTest.Designer.cs (3)
76dataGridViewCellStyle3.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(204))); 148this.changeFontButton.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(204))); 196this.resetFontButton.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(204)));