30 references to Unit
System.Drawing.Common (14)
System\Drawing\Font.cs (7)
35
/// Gets the em-size of this <see cref="Font"/> measured in the units specified by the <see cref="
Unit
"/> property.
160
si.AddValue("Unit",
Unit
); // Do not rename (binary serialization)
249
&& font.
Unit
==
Unit
;
255
public override int GetHashCode() => HashCode.Combine(Name, Style, Size,
Unit
);
368
Initialize(prototype.FontFamily, prototype.Size, newStyle, prototype.
Unit
, (byte)FONT_CHARSET.DEFAULT_CHARSET, false);
738
if (
Unit
== GraphicsUnit.Point)
System\Drawing\FontConverter.cs (4)
41
switch (font.
Unit
)
98
else if (font.
Unit
!= GraphicsUnit.Point)
123
args[3] = font.
Unit
;
399
return props.Sort([nameof(Font.Name), nameof(Font.Size), nameof(Font.
Unit
)]);
System\Drawing\SystemFonts.cs (3)
210
if (defaultFont.
Unit
!= GraphicsUnit.Point)
250
else if (dialogFont.
Unit
!= GraphicsUnit.Point)
281
: font.
Unit
!= GraphicsUnit.Point ? FontInPoints(font) : font;
System.Drawing.Common.Tests (7)
System\Drawing\FontConverterTests.cs (4)
54
Assert.Equal(expectedUnits, font.
Unit
);
90
nameof(Font.
Unit
),
127
Assert.Equal(font.
Unit
, newFont.
Unit
);
System\Drawing\FontTests.cs (3)
402
Assert.Equal(font.
Unit
, clone.
Unit
);
867
Assert.Equal(expectedUnit, font.
Unit
);
System.Windows.Forms (5)
System\Windows\Forms\ActiveX\AxHost.cs (3)
3676
if (font.
Unit
!= GraphicsUnit.Point)
3710
return f.
Unit
== GraphicsUnit.Point
3731
if (font.
Unit
!= GraphicsUnit.Point)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
72
if (sysFont.
Unit
!= GraphicsUnit.Point)
108
if (sysFont.
Unit
!= GraphicsUnit.Point)
System.Windows.Forms.Primitives (1)
System\Windows\Forms\FontExtensions.cs (1)
26
templateFont.
Unit
,
System.Windows.Forms.Tests (3)
System\Windows\Forms\FontDialogTests.cs (2)
255
Assert.Equal(GraphicsUnit.Point, result.
Unit
);
273
Assert.Equal(GraphicsUnit.Point, result.
Unit
);
System\Windows\Forms\RichTextBoxTests.cs (1)
4760
Assert.Equal(GraphicsUnit.Point, font.
Unit
);