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