75 instantiations of StringFormat
PresentationUI (1)
MS\Internal\Documents\SignatureSummaryDialog.cs (1)
618
StringFormat stringFormat = new
StringFormat
();
System.Drawing.Common.Tests (54)
mono\System.Drawing\GraphicsTests.cs (12)
1652
using StringFormat string_format =
new
();
1683
using StringFormat string_format =
new
();
1716
using StringFormat string_format =
new
();
1747
using StringFormat string_format =
new
();
1872
Region[] regions = g.MeasureCharacterRanges("Mono", _font, default, new
StringFormat
());
1875
g.MeasureCharacterRanges("Mono".AsSpan(), _font, default, new
StringFormat
());
1894
using StringFormat string_format =
new
();
1917
using StringFormat string_format =
new
();
1961
using StringFormat string_format =
new
();
2085
using StringFormat fmt =
new
();
2102
using StringFormat fmt =
new
();
2119
using StringFormat format =
new
();
mono\System.Imaging\MetafileTest.cs (1)
311
StringFormat sf =
new
()
System\Drawing\StringFormatTests.cs (41)
16
using StringFormat format =
new
();
31
using StringFormat format =
new
(options);
47
using StringFormat format =
new
(options, language);
60
using StringFormat original =
new
(StringFormatFlags.NoClip, EnglishLanguageCode);
61
using StringFormat format =
new
(original);
78
AssertExtensions.Throws<ArgumentNullException>("format", () => new
StringFormat
(null));
84
StringFormat format =
new
();
87
AssertExtensions.Throws<ArgumentException>(null, () => new
StringFormat
(format));
93
StringFormat format =
new
();
101
using StringFormat original =
new
(StringFormatFlags.NoClip, EnglishLanguageCode);
119
StringFormat format =
new
();
132
using StringFormat format =
new
();
141
StringFormat format =
new
();
152
using StringFormat format =
new
();
162
using StringFormat format =
new
();
169
using StringFormat format =
new
();
176
using StringFormat format =
new
();
183
StringFormat format =
new
();
192
StringFormat format =
new
();
210
using StringFormat format =
new
();
217
using StringFormat format =
new
();
224
using StringFormat format =
new
();
231
StringFormat format =
new
();
243
using StringFormat format =
new
() { Alignment = alignment };
252
using StringFormat format =
new
();
259
StringFormat format =
new
();
269
StringFormat format =
new
();
278
StringFormat format =
new
();
290
using StringFormat format =
new
() { FormatFlags = formatFlags };
297
StringFormat format =
new
();
310
using StringFormat format =
new
() { LineAlignment = alignment };
319
using StringFormat format =
new
();
326
StringFormat format =
new
();
339
using StringFormat format =
new
() { HotkeyPrefix = prefix };
348
using StringFormat format =
new
();
355
StringFormat format =
new
();
366
using StringFormat format =
new
() { Trimming = trimming };
375
using StringFormat format =
new
();
382
StringFormat format =
new
();
422
using StringFormat format =
new
(StringFormatFlags.DirectionVertical);
429
StringFormat format =
new
(StringFormatFlags.DirectionVertical);
System.Windows.Forms (7)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
1017
return new
StringFormat
();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (1)
74
StringFormat format =
new
()
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
474
using StringFormat format = new
StringFormat
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
634
using StringFormat format =
new
();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1600
StringFormat stringFormat =
new
(StringFormatFlags.NoWrap)
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
603
using StringFormat format =
new
()
System\Windows\Forms\Rendering\ControlPaint.cs (1)
2538
StringFormat stringFormat =
new
()
System.Windows.Forms.Design (5)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
605
using (StringFormat format =
new
())
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
33
_watermarkFormat = new
StringFormat
System\Drawing\Design\FontNameEditor.cs (1)
74
StringFormat format =
new
(StringFormatFlags.NoWrap | StringFormatFlags.NoFontFallback)
System\Windows\Forms\Design\ComponentTray.cs (1)
2279
StringFormat format =
new
();
System\Windows\Forms\Design\ControlDesigner.cs (1)
2231
StringFormat stringFormat = new
StringFormat
System.Windows.Forms.Tests (8)
System\Windows\Forms\ControlPaintTests.cs (8)
1901
yield return new object[] { s, SystemFonts.MenuFont, Color.Red, RectangleF.Empty, new
StringFormat
() };
1902
yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, -3, -4), new
StringFormat
() };
1903
yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new
StringFormat
() };
1904
yield return new object[] { s, SystemFonts.MenuFont, Color.Black, new RectangleF(1, 2, 3, 4), new
StringFormat
() };
1905
yield return new object[] { s, SystemFonts.MenuFont, Color.White, new RectangleF(1, 2, 3, 4), new
StringFormat
() };
1906
yield return new object[] { s, SystemFonts.MenuFont, Color.Transparent, new RectangleF(1, 2, 3, 4), new
StringFormat
() };
1907
yield return new object[] { s, SystemFonts.MenuFont, Color.Empty, new RectangleF(1, 2, 3, 4), new
StringFormat
() };
1941
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new
StringFormat
()));
128 references to StringFormat
PresentationUI (1)
MS\Internal\Documents\SignatureSummaryDialog.cs (1)
618
StringFormat
stringFormat = new StringFormat();
System.Drawing (1)
System.Drawing.cs (1)
150
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
StringFormat
))]
System.Drawing.Common (15)
Special\NotSupported.cs (15)
543
public void DrawString(string? s, System.Drawing.Font font, System.Drawing.Brush brush, System.Drawing.PointF point, System.Drawing.
StringFormat
? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
545
public void DrawString(string? s, System.Drawing.Font font, System.Drawing.Brush brush, System.Drawing.RectangleF layoutRectangle, System.Drawing.
StringFormat
? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
547
public void DrawString(string? s, System.Drawing.Font font, System.Drawing.Brush brush, float x, float y, System.Drawing.
StringFormat
? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
642
public System.Drawing.Region[] MeasureCharacterRanges(string? text, System.Drawing.Font font, System.Drawing.RectangleF layoutRect, System.Drawing.
StringFormat
? stringFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
644
public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, System.Drawing.PointF origin, System.Drawing.
StringFormat
? stringFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
646
public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, System.Drawing.SizeF layoutArea, System.Drawing.
StringFormat
? stringFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
647
public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, System.Drawing.SizeF layoutArea, System.Drawing.
StringFormat
? stringFormat, out int charactersFitted, out int linesFilled) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
649
public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, int width, System.Drawing.
StringFormat
? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1132
public StringFormat(System.Drawing.
StringFormat
format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1139
public static System.Drawing.
StringFormat
GenericDefault { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1140
public static System.Drawing.
StringFormat
GenericTypographic { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1551
public void AddString(string s, System.Drawing.FontFamily family, int style, float emSize, System.Drawing.Point origin, System.Drawing.
StringFormat
? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1552
public void AddString(string s, System.Drawing.FontFamily family, int style, float emSize, System.Drawing.PointF origin, System.Drawing.
StringFormat
? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1553
public void AddString(string s, System.Drawing.FontFamily family, int style, float emSize, System.Drawing.Rectangle layoutRect, System.Drawing.
StringFormat
? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1554
public void AddString(string s, System.Drawing.FontFamily family, int style, float emSize, System.Drawing.RectangleF layoutRect, System.Drawing.
StringFormat
? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (79)
mono\System.Drawing\GraphicsTests.cs (12)
1652
using
StringFormat
string_format = new();
1683
using
StringFormat
string_format = new();
1716
using
StringFormat
string_format = new();
1747
using
StringFormat
string_format = new();
1894
using
StringFormat
string_format = new();
1917
using
StringFormat
string_format = new();
1961
using
StringFormat
string_format = new();
2008
using
StringFormat
format =
StringFormat
.GenericTypographic;
2085
using
StringFormat
fmt = new();
2102
using
StringFormat
fmt = new();
2119
using
StringFormat
format = new();
mono\System.Imaging\MetafileTest.cs (1)
311
StringFormat
sf = new()
System\Drawing\Drawing2D\GraphicsPathTests.cs (19)
995
gpi.AddString("mono", FontFamily.GenericMonospace, 0, 10, new Point(10, 10),
StringFormat
.GenericDefault);
998
gpf.AddString("mono", FontFamily.GenericMonospace, 0, 10, new PointF(10f, 10f),
StringFormat
.GenericDefault);
1007
gpi.AddString("mono", FontFamily.GenericMonospace, 0, 10, new Rectangle(10, 10, 10, 10),
StringFormat
.GenericDefault);
1010
gpf.AddString("mono", FontFamily.GenericMonospace, 0, 10, new RectangleF(10f, 10f, 10f, 10f),
StringFormat
.GenericDefault);
1019
gpi.AddString("mono", FontFamily.GenericMonospace, 0, -10, new Point(10, 10),
StringFormat
.GenericDefault);
1023
gpi.AddString("mono", FontFamily.GenericMonospace, 0, -10, new Rectangle(10, 10, 10, 10),
StringFormat
.GenericDefault);
1026
gpf.AddString("mono", FontFamily.GenericMonospace, 0, -10, new PointF(10f, 10f),
StringFormat
.GenericDefault);
1030
gpf.AddString("mono", FontFamily.GenericMonospace, 0, -10, new RectangleF(10f, 10f, 10f, 10f),
StringFormat
.GenericDefault);
1043
gp2.AddString("mono", FontFamily.GenericMonospace, 0, 10, new RectangleF(10f, 10f, 10f, 10f),
StringFormat
.GenericDefault);
1046
gp3.AddString("mono", FontFamily.GenericMonospace, 0, 10, new RectangleF(10f, 10f, 10f, 10f),
StringFormat
.GenericTypographic);
1055
gpi.AddString(string.Empty, FontFamily.GenericMonospace, 0, 10, new Point(10, 10),
StringFormat
.GenericDefault);
1058
gpi.AddString(string.Empty, FontFamily.GenericMonospace, 0, 10, new PointF(10f, 10f),
StringFormat
.GenericDefault);
1067
gp.AddString(null, FontFamily.GenericMonospace, 0, 10, new Point(10, 10),
StringFormat
.GenericDefault));
1069
gp.AddString(null, FontFamily.GenericMonospace, 0, 10, new PointF(10f, 10f),
StringFormat
.GenericDefault));
1071
gp.AddString(null, FontFamily.GenericMonospace, 0, 10, new Rectangle(10, 10, 10, 10),
StringFormat
.GenericDefault));
1073
gp.AddString(null, FontFamily.GenericMonospace, 0, 10, new RectangleF(10f, 10f, 10f, 10f),
StringFormat
.GenericDefault));
1081
new GraphicsPath().AddString("mono", null, 0, 10, new Point(10, 10),
StringFormat
.GenericDefault));
1636
gp.AddString("mono", FontFamily.GenericMonospace, 0, 10, new Point(20, 20),
StringFormat
.GenericDefault);
1979
gp.AddString("Mono::", FontFamily.GenericMonospace, 0, 10, new Point(10, 10),
StringFormat
.GenericDefault);
System\Drawing\StringFormatTests.cs (47)
16
using
StringFormat
format = new();
31
using
StringFormat
format = new(options);
47
using
StringFormat
format = new(options, language);
60
using
StringFormat
original = new(StringFormatFlags.NoClip, EnglishLanguageCode);
61
using
StringFormat
format = new(original);
84
StringFormat
format = new();
93
StringFormat
format = new();
101
using
StringFormat
original = new(StringFormatFlags.NoClip, EnglishLanguageCode);
102
using
StringFormat
format = Assert.IsType<
StringFormat
>(original.Clone());
119
StringFormat
format = new();
132
using
StringFormat
format = new();
141
StringFormat
format = new();
152
using
StringFormat
format = new();
162
using
StringFormat
format = new();
169
using
StringFormat
format = new();
176
using
StringFormat
format = new();
183
StringFormat
format = new();
192
StringFormat
format = new();
210
using
StringFormat
format = new();
217
using
StringFormat
format = new();
224
using
StringFormat
format = new();
231
StringFormat
format = new();
243
using
StringFormat
format = new() { Alignment = alignment };
252
using
StringFormat
format = new();
259
StringFormat
format = new();
269
StringFormat
format = new();
278
StringFormat
format = new();
290
using
StringFormat
format = new() { FormatFlags = formatFlags };
297
StringFormat
format = new();
310
using
StringFormat
format = new() { LineAlignment = alignment };
319
using
StringFormat
format = new();
326
StringFormat
format = new();
339
using
StringFormat
format = new() { HotkeyPrefix = prefix };
348
using
StringFormat
format = new();
355
StringFormat
format = new();
366
using
StringFormat
format = new() { Trimming = trimming };
375
using
StringFormat
format = new();
382
StringFormat
format = new();
392
StringFormat
format =
StringFormat
.GenericDefault;
393
Assert.NotSame(format,
StringFormat
.GenericDefault);
407
StringFormat
format =
StringFormat
.GenericTypographic;
408
Assert.NotSame(format,
StringFormat
.GenericTypographic);
422
using
StringFormat
format = new(StringFormatFlags.DirectionVertical);
429
StringFormat
format = new(StringFormatFlags.DirectionVertical);
System.Windows.Forms (25)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
1012
internal virtual
StringFormat
CreateStringFormat()
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (4)
86
/// Get <see cref="
StringFormat
"/> object for rendering text using GDI+ (<see cref="Graphics"/>).
88
internal virtual
StringFormat
CreateStringFormat()
461
using
StringFormat
stringFormat = CreateStringFormat();
619
using
StringFormat
format = Control.CreateStringFormat();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (3)
70
public
StringFormat
StringFormat
74
StringFormat
format = new()
669
using
StringFormat
stringFormat = StringFormat;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
266
private
StringFormat
? _placeholderStringFormat;
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
474
using
StringFormat
format = new StringFormat
System\Windows\Forms\Controls\Labels\Label.cs (3)
910
internal virtual
StringFormat
CreateStringFormat()
1081
using
StringFormat
stringFormat = CreateStringFormat();
1282
using
StringFormat
stringFormat = CreateStringFormat();
System\Windows\Forms\Controls\Labels\LinkLabel.cs (6)
528
using
StringFormat
textFormat = CreateStringFormat();
601
internal override
StringFormat
CreateStringFormat()
603
StringFormat
stringFormat = base.CreateStringFormat();
1124
StringFormat
stringFormat = CreateStringFormat();
1293
StringFormat
stringFormat = CreateStringFormat();
1352
StringFormat
stringFormat = CreateStringFormat();
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
634
using
StringFormat
format = new();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1600
StringFormat
stringFormat = new(StringFormatFlags.NoWrap)
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
603
using
StringFormat
format = new()
System\Windows\Forms\Rendering\ControlPaint.cs (3)
1950
StringFormat
format)
2532
internal static
StringFormat
CreateStringFormat(
2538
StringFormat
stringFormat = new()
System.Windows.Forms.Design (5)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
605
using (
StringFormat
format = new())
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
25
private readonly
StringFormat
_watermarkFormat;
System\Drawing\Design\FontNameEditor.cs (1)
74
StringFormat
format = new(StringFormatFlags.NoWrap | StringFormatFlags.NoFontFallback)
System\Windows\Forms\Design\ComponentTray.cs (1)
2279
StringFormat
format = new();
System\Windows\Forms\Design\ControlDesigner.cs (1)
2231
StringFormat
stringFormat = new StringFormat
System.Windows.Forms.Tests (1)
System\Windows\Forms\ControlPaintTests.cs (1)
1915
RectangleF layoutRectangle,
StringFormat
format)
WinFormsControlsTest (1)
ListBoxes.cs (1)
47
e.Font, customBrush, e.Bounds,
StringFormat
.GenericDefault);