399 references to TextFormatFlags
System.Windows.Forms (378)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (2)
1081
internal virtual
TextFormatFlags
CreateTextFormatFlags()
1086
return
TextFormatFlags
.Default;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (3)
94
/// Get <see cref="
TextFormatFlags
"/> for rendering text using GDI (<see cref="TextRenderer"/>).
96
internal virtual
TextFormatFlags
CreateTextFormatFlags()
492
TextFormatFlags
formatFlags = CreateTextFormatFlags();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (5)
50
public
TextFormatFlags
GdiTextFormatFlags { get; set; } =
TextFormatFlags
.WordBreak |
TextFormatFlags
.TextBoxControl;
100
public
TextFormatFlags
TextFormatFlags =>
101
_disableWordWrapping ? GdiTextFormatFlags & ~
TextFormatFlags
.WordBreak : GdiTextFormatFlags;
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (15)
65
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, PushButtonState)"/>
124
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, PushButtonState)"/>
128
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, PushButtonState)"/>
136
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.SingleLine,
141
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, PushButtonState)"/>
142
public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText, Font? font,
TextFormatFlags
flags, bool focused, PushButtonState state)
170
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, PushButtonState)"/>
197
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, PushButtonState)"/>
211
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.SingleLine,
225
TextFormatFlags
flags,
237
TextFormatFlags
flags,
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (13)
49
/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, CheckBoxState)"/>
83
/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, CheckBoxState)"/>
97
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.SingleLine,
101
/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, CheckBoxState)"/>
108
TextFormatFlags
flags,
118
TextFormatFlags
flags,
155
/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, CheckBoxState)"/>
171
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.SingleLine,
186
TextFormatFlags
flags,
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (14)
49
/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, RadioButtonState)" />
87
/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, RadioButtonState)" />
98
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.SingleLine,
102
/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, RadioButtonState)" />
109
TextFormatFlags
flags,
122
TextFormatFlags
flags,
155
/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?,
TextFormatFlags
, Image, Rectangle, bool, RadioButtonState)" />
171
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.SingleLine,
186
TextFormatFlags
flags,
209
TextFormatFlags
flags,
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (5)
779
Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString, Font, new Size(short.MaxValue, (int)(FontHeight * 1.25)),
TextFormatFlags
.SingleLine);
790
Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString, Font, new Size(short.MaxValue, (int)(FontHeight * 1.25)),
TextFormatFlags
.SingleLine);
3814
TextFormatFlags
.Left |
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.EndEllipsis);
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (4)
64
DrawTextBox(g, bounds, comboBoxText, font,
TextFormatFlags
.TextBoxControl, state);
72
DrawTextBox(g, bounds, comboBoxText, font, textBounds,
TextFormatFlags
.TextBoxControl, state);
78
public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font,
TextFormatFlags
flags, ComboBoxState state)
90
public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, Rectangle textBounds,
TextFormatFlags
flags, ComboBoxState state)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
301
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
984
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (15)
19
private const
TextFormatFlags
TextFormatSupportedFlags =
TextFormatFlags
.SingleLine
20
| /*TextFormatFlags.NoFullWidthCharacterBreak |*/
TextFormatFlags
.WordBreak |
TextFormatFlags
.NoPrefix;
2310
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(rightToLeft, cellStyle.Alignment, cellStyle.WrapMode);
2513
TextFormatFlags
flags) => MeasureTextHeight(
2527
TextFormatFlags
flags,
2536
throw new InvalidEnumArgumentException(nameof(flags), (int)flags, typeof(
TextFormatFlags
));
2552
TextFormatFlags
flags)
2560
throw new InvalidEnumArgumentException(nameof(flags), (int)flags, typeof(
TextFormatFlags
));
2597
TextFormatFlags
flags)
2604
throw new InvalidEnumArgumentException(nameof(flags), (int)flags, typeof(
TextFormatFlags
));
2618
TextFormatFlags
flags)
2623
if (oneLineSize.Height >= maxHeight || (flags &
TextFormatFlags
.SingleLine) != 0)
3947
internal static bool TextFitsInBounds(Graphics graphics, string text, Font font, Size maxBounds,
TextFormatFlags
flags)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (4)
500
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
966
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
971
if ((flags &
TextFormatFlags
.SingleLine) != 0)
973
flags |=
TextFormatFlags
.EndEllipsis;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (5)
828
return MeasureTextHeight(graphics, " ", cellStyle.Font!, int.MaxValue,
TextFormatFlags
.Default) + adjustment;
1176
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
2312
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
2317
if ((flags &
TextFormatFlags
.SingleLine) != 0)
2319
flags |=
TextFormatFlags
.EndEllipsis;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (4)
558
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
956
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(
1019
if ((flags &
TextFormatFlags
.SingleLine) != 0)
1021
flags |=
TextFormatFlags
.EndEllipsis;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (4)
533
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
851
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
887
if ((flags &
TextFormatFlags
.SingleLine) != 0)
889
flags |=
TextFormatFlags
.EndEllipsis;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (5)
224
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
410
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
731
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(
740
if ((flags &
TextFormatFlags
.SingleLine) != 0)
742
flags |=
TextFormatFlags
.EndEllipsis;
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (4)
148
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
318
TextFormatFlags
flags = DataGridViewUtilities.ComputeTextFormatFlagsForCellStyleAlignment(DataGridView.RightToLeftInternal, cellStyle.Alignment, cellStyle.WrapMode);
323
if ((flags &
TextFormatFlags
.SingleLine) != 0)
325
flags |=
TextFormatFlags
.EndEllipsis;
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (66)
36
internal static
TextFormatFlags
ComputeTextFormatFlagsForCellStyleAlignment(
41
TextFormatFlags
tff;
45
tff =
TextFormatFlags
.Top;
48
tff |=
TextFormatFlags
.Right;
52
tff |=
TextFormatFlags
.Left;
57
tff =
TextFormatFlags
.Top |
TextFormatFlags
.HorizontalCenter;
60
tff =
TextFormatFlags
.Top;
63
tff |=
TextFormatFlags
.Left;
67
tff |=
TextFormatFlags
.Right;
72
tff =
TextFormatFlags
.VerticalCenter;
75
tff |=
TextFormatFlags
.Right;
79
tff |=
TextFormatFlags
.Left;
84
tff =
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.HorizontalCenter;
87
tff =
TextFormatFlags
.VerticalCenter;
90
tff |=
TextFormatFlags
.Left;
94
tff |=
TextFormatFlags
.Right;
99
tff =
TextFormatFlags
.Bottom;
102
tff |=
TextFormatFlags
.Right;
106
tff |=
TextFormatFlags
.Left;
111
tff =
TextFormatFlags
.Bottom |
TextFormatFlags
.HorizontalCenter;
114
tff =
TextFormatFlags
.Bottom;
117
tff |=
TextFormatFlags
.Left;
121
tff |=
TextFormatFlags
.Right;
126
tff =
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter;
132
tff |=
TextFormatFlags
.SingleLine;
137
tff |=
TextFormatFlags
.WordBreak;
140
tff |=
TextFormatFlags
.NoPrefix;
141
tff |=
TextFormatFlags
.PreserveGraphicsClipping;
144
tff |=
TextFormatFlags
.RightToLeft;
159
TextFormatFlags
flags)
307
TextFormatFlags
flags,
316
TextFormatFlags
flags,
320
if ((flags &
TextFormatFlags
.SingleLine) != 0)
325
flags |=
TextFormatFlags
.EndEllipsis;
352
TextFormatFlags
flags,
359
if ((flags &
TextFormatFlags
.RightToLeft) != 0)
444
internal static bool ValidTextFormatFlags(
TextFormatFlags
flags)
447
return (flags & ~(
TextFormatFlags
.Bottom |
448
TextFormatFlags
.Default |
449
TextFormatFlags
.EndEllipsis |
450
TextFormatFlags
.ExpandTabs |
451
TextFormatFlags
.ExternalLeading |
452
TextFormatFlags
.HidePrefix |
453
TextFormatFlags
.HorizontalCenter |
454
TextFormatFlags
.Internal |
455
TextFormatFlags
.Left |
456
TextFormatFlags
.ModifyString |
457
TextFormatFlags
.NoClipping |
458
TextFormatFlags
.NoFullWidthCharacterBreak |
459
TextFormatFlags
.NoPrefix |
460
TextFormatFlags
.PathEllipsis |
461
TextFormatFlags
.PrefixOnly |
462
TextFormatFlags
.PreserveGraphicsClipping |
463
TextFormatFlags
.PreserveGraphicsTranslateTransform |
464
TextFormatFlags
.Right |
465
TextFormatFlags
.RightToLeft |
466
TextFormatFlags
.SingleLine |
467
TextFormatFlags
.TextBoxControl |
468
TextFormatFlags
.Top |
469
TextFormatFlags
.VerticalCenter |
470
TextFormatFlags
.WordBreak |
471
TextFormatFlags
.WordEllipsis)) == 0;
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (11)
411
TextFormatFlags
textFlags =
TextFormatFlags
.TextBoxControl |
TextFormatFlags
.WordBreak
412
|
TextFormatFlags
.PreserveGraphicsTranslateTransform |
TextFormatFlags
.PreserveGraphicsClipping;
416
textFlags |=
TextFormatFlags
.HidePrefix;
421
textFlags |= (
TextFormatFlags
.Right |
TextFormatFlags
.RightToLeft);
514
textSize = hdc.HDC.MeasureText(Text, hfont, new Size(textRectangle.Width, int.MaxValue), (
TextFormatFlags
)flags);
518
hdc.HDC.DrawText(Text, hfont, textRectangle, ForeColor, (
TextFormatFlags
)flags);
528
(
TextFormatFlags
)flags);
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (16)
78
=> DrawGroupBox(g, bounds, groupBoxText, font,
TextFormatFlags
.Top |
TextFormatFlags
.Left, state);
90
=> DrawGroupBox(g, bounds, groupBoxText, font, textColor,
TextFormatFlags
.Top |
TextFormatFlags
.Left, state);
100
TextFormatFlags
flags,
109
TextFormatFlags
flags,
131
TextFormatFlags
flags,
141
TextFormatFlags
flags,
172
TextFormatFlags
flags,
191
if ((flags &
TextFormatFlags
.Right) ==
TextFormatFlags
.Right)
219
if ((flags &
TextFormatFlags
.Right) ==
TextFormatFlags
.Right)
278
TextFormatFlags
flags)
294
if ((flags &
TextFormatFlags
.Right) ==
TextFormatFlags
.Right)
System\Windows\Forms\Controls\Labels\Label.cs (13)
911
private
TextFormatFlags
CreateTextFormatFlags()
917
private protected
TextFormatFlags
CreateTextFormatFlags(Size constrainingSize)
924
TextFormatFlags
flags = ControlPaint.CreateTextFormatFlags(this, TextAlign, AutoEllipsis, UseMnemonic);
932
flags &= ~(
TextFormatFlags
.WordBreak |
TextFormatFlags
.TextBoxControl);
1072
TextFormatFlags
format = FlatStyle == FlatStyle.System ?
TextFormatFlags
.Default : CreateTextFormatFlags(proposedConstraints);
1109
TextFormatFlags
flags = CreateTextFormatFlags();
1112
if ((flags &
TextFormatFlags
.NoPadding) ==
TextFormatFlags
.NoPadding)
1116
else if ((flags &
TextFormatFlags
.LeftAndRightPadding) ==
TextFormatFlags
.LeftAndRightPadding)
1293
TextFormatFlags
flags = CreateTextFormatFlags();
System\Windows\Forms\Controls\Labels\LinkLabel.cs (5)
561
TextFormatFlags
flags = CreateTextFormatFlags(clientSize);
568
if ((flags &
TextFormatFlags
.NoPadding) ==
TextFormatFlags
.NoPadding)
572
else if ((flags &
TextFormatFlags
.LeftAndRightPadding) ==
TextFormatFlags
.LeftAndRightPadding)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (6)
688
TextFormatFlags
flags =
TextFormatFlags
.Default;
689
flags |=
TextFormatFlags
.NoPrefix;
693
flags |=
TextFormatFlags
.ExpandTabs;
699
flags |=
TextFormatFlags
.RightToLeft;
700
flags |=
TextFormatFlags
.Right;
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (6)
128
TextFormatFlags
flags = (hAlign == HorizontalAlignment.Left) ?
TextFormatFlags
.Left :
129
((hAlign == HorizontalAlignment.Center) ?
TextFormatFlags
.HorizontalCenter :
130
TextFormatFlags
.Right);
131
flags |=
TextFormatFlags
.WordEllipsis;
139
public void DrawText(
TextFormatFlags
flags)
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (2)
84
public void DrawText() => DrawText(
TextFormatFlags
.Left);
89
public void DrawText(
TextFormatFlags
flags)
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (6)
124
TextFormatFlags
flags = (hAlign == HorizontalAlignment.Left) ?
TextFormatFlags
.Left :
125
((hAlign == HorizontalAlignment.Center) ?
TextFormatFlags
.HorizontalCenter :
126
TextFormatFlags
.Right);
127
flags |=
TextFormatFlags
.WordEllipsis;
135
public void DrawText(
TextFormatFlags
flags)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.MeasureTextHelper.cs (10)
29
TextFormatFlags
.PreserveGraphicsClipping |
TextFormatFlags
.PreserveGraphicsTranslateTransform);
39
TextFormatFlags
.PreserveGraphicsClipping
40
|
TextFormatFlags
.PreserveGraphicsTranslateTransform
41
|
TextFormatFlags
.LeftAndRightPadding
42
|
TextFormatFlags
.WordBreak
43
|
TextFormatFlags
.NoFullWidthCharacterBreak);
45
public static
TextFormatFlags
GetTextRendererFlags()
46
=>
TextFormatFlags
.PreserveGraphicsClipping |
TextFormatFlags
.PreserveGraphicsTranslateTransform;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1935
(
TextFormatFlags
)format | PropertyGrid.MeasureTextHelper.GetTextRendererFlags());
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (4)
3455
TextFormatFlags
.Left
3456
|
TextFormatFlags
.Top
3457
|
TextFormatFlags
.WordBreak
3458
|
TextFormatFlags
.EndEllipsis);
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (8)
65
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.SingleLine,
72
public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font,
TextFormatFlags
flags, bool focused, TabItemState state)
114
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter |
TextFormatFlags
.SingleLine,
121
public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font,
TextFormatFlags
flags, Image image, Rectangle imageRectangle, bool focused, TabItemState state)
System\Windows\Forms\Controls\TextBox\TextBox.cs (12)
849
TextFormatFlags
flags =
TextFormatFlags
.NoPadding |
TextFormatFlags
.Top |
TextFormatFlags
.EndEllipsis;
854
flags |=
TextFormatFlags
.RightToLeft;
858
flags |=
TextFormatFlags
.HorizontalCenter;
862
flags |=
TextFormatFlags
.Right;
866
flags |=
TextFormatFlags
.Left;
873
flags &= ~
TextFormatFlags
.RightToLeft;
877
flags |=
TextFormatFlags
.HorizontalCenter;
881
flags |=
TextFormatFlags
.Left;
885
flags |=
TextFormatFlags
.Right;
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (4)
841
TextFormatFlags
format =
TextFormatFlags
.NoPrefix;
844
format |=
TextFormatFlags
.SingleLine;
848
format |=
TextFormatFlags
.WordBreak;
System\Windows\Forms\Controls\TextBox\TextBoxRenderer.cs (4)
53
DrawTextBox(g, bounds, textBoxText, font,
TextFormatFlags
.TextBoxControl, state);
61
DrawTextBox(g, bounds, textBoxText, font, textBounds,
TextFormatFlags
.TextBoxControl, state);
67
public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font,
TextFormatFlags
flags, TextBoxState state)
78
public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, Rectangle textBounds,
TextFormatFlags
flags, TextBoxState state)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (6)
69
public virtual
TextFormatFlags
TextFormat
82
internal static
TextFormatFlags
ContentAlignmentToTextFormat(ContentAlignment alignment, bool rightToLeft)
84
TextFormatFlags
textFormat =
TextFormatFlags
.Default;
88
textFormat |=
TextFormatFlags
.RightToLeft;
129
layoutOptions.GdiTextFormatFlags = Owner.ShowKeyboardCues ? layoutOptions.GdiTextFormatFlags : layoutOptions.GdiTextFormatFlags |
TextFormatFlags
.HidePrefix;
System\Windows\Forms\Controls\ToolStrips\ToolStripItemTextRenderEventArgs.cs (3)
26
TextFormatFlags
format)
59
TextFormat = (item.ShowKeyboardCues) ? TextFormat : TextFormat |
TextFormatFlags
.HidePrefix;
96
public
TextFormatFlags
TextFormat { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
902
TextFormatFlags
textFormat = e.TextFormat;
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2835
TextRenderer.DrawText(g, node.Text, font, bounds, color,
TextFormatFlags
.Default);
2842
TextRenderer.DrawText(g, node.Text, font, bounds, color,
TextFormatFlags
.Default);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
213
textSize = Size.Ceiling(TextRenderer.MeasureText(messageText, Font, textSize,
TextFormatFlags
.WordBreak));
System\Windows\Forms\Layout\LayoutUtils.cs (1)
50
Size textSize = TextRenderer.MeasureText(obj.ToString(), font, new Size(short.MaxValue, short.MaxValue),
TextFormatFlags
.SingleLine);
System\Windows\Forms\Layout\LayoutUtils.MeasureTextCache.cs (4)
29
public Size GetTextSize(string? text, Font? font, Size proposedConstraints,
TextFormatFlags
flags)
99
public bool TextRequiresWordBreak(string? text, Font? font, Size size,
TextFormatFlags
flags)
108
private Size GetUnconstrainedSize(string? text, Font? font,
TextFormatFlags
flags)
115
flags &= ~
TextFormatFlags
.WordBreak; // rip out the wordbreak flag
System\Windows\Forms\Rendering\ControlPaint.cs (18)
2042
TextFormatFlags
format)
2059
TextFormatFlags
format,
2557
internal static
TextFormatFlags
ConvertAlignmentToTextFormat(ContentAlignment alignment)
2560
TextFormatFlags
flags =
TextFormatFlags
.Top |
TextFormatFlags
.Left;
2564
flags |=
TextFormatFlags
.Bottom;
2568
flags |=
TextFormatFlags
.VerticalCenter;
2573
flags |=
TextFormatFlags
.Right;
2577
flags |=
TextFormatFlags
.HorizontalCenter;
2640
internal static
TextFormatFlags
CreateTextFormatFlags(
2647
TextFormatFlags
flags = ConvertAlignmentToTextFormat(alignment);
2652
flags |=
TextFormatFlags
.WordBreak |
TextFormatFlags
.TextBoxControl;
2656
flags |=
TextFormatFlags
.EndEllipsis;
2662
flags |=
TextFormatFlags
.RightToLeft;
2668
flags |=
TextFormatFlags
.NoPrefix;
2673
flags |=
TextFormatFlags
.HidePrefix;
System\Windows\Forms\Rendering\TextExtensions.cs (5)
25
private static (DRAW_TEXT_FORMAT Flags, TextPaddingOptions Padding) SplitTextFormatFlags(
TextFormatFlags
flags)
35
TextPaddingOptions padding = flags.HasFlag(
TextFormatFlags
.LeftAndRightPadding)
37
: flags.HasFlag(
TextFormatFlags
.NoPadding)
55
TextFormatFlags
flags,
215
TextFormatFlags
flags)
System\Windows\Forms\Rendering\TextRenderer.cs (49)
18
internal const
TextFormatFlags
SkipAssertFlag = (
TextFormatFlags
)0x4000_0000;
74
TextFormatFlags
flags)
86
/// <param name="flags">A bitwise combination of the <see cref="
TextFormatFlags
"/> values.</param>
89
/// Thrown if <see cref="
TextFormatFlags
.ModifyString"/> is set.
97
TextFormatFlags
flags)
114
TextFormatFlags
flags)
127
/// <param name="flags">A bitwise combination of the <see cref="
TextFormatFlags
"/> values.</param>
130
/// Thrown if <see cref="
TextFormatFlags
.ModifyString"/> is set.
139
TextFormatFlags
flags)
204
TextFormatFlags
flags)
216
/// <param name="flags">A bitwise combination of the <see cref="
TextFormatFlags
"/> values.</param>
219
/// Thrown if <see cref="
TextFormatFlags
.ModifyString"/> is set.
227
TextFormatFlags
flags)
244
TextFormatFlags
flags)
257
/// <param name="flags">A bitwise combination of the <see cref="
TextFormatFlags
"/> values.</param>
260
/// Thrown if <see cref="
TextFormatFlags
.ModifyString"/> is set.
269
TextFormatFlags
flags)
286
TextFormatFlags
flags =
TextFormatFlags
.Default)
296
TextFormatFlags
flags =
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter)
318
TextFormatFlags
flags)
328
TextFormatFlags
flags =
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter)
352
TextFormatFlags
flags)
363
TextFormatFlags
flags)
369
private static
TextFormatFlags
BlockModifyString(
TextFormatFlags
flags)
372
if (flags.HasFlag(
TextFormatFlags
.ModifyString))
392
/// <see cref="DrawText(IDeviceContext, ReadOnlySpan{char}, Font?, Rectangle, Color,
TextFormatFlags
)"/>
393
/// overloads that takes a <see cref="
TextFormatFlags
"/> parameter. For example, the default behavior of the
398
/// <see cref="
TextFormatFlags
"/> parameter. For an example, see
399
/// <see cref="MeasureText(IDeviceContext, string?, Font?, Size,
TextFormatFlags
)"/>.
421
public static Size MeasureText(string? text, Font? font, Size proposedSize,
TextFormatFlags
flags)
437
/// Thrown if <see cref="
TextFormatFlags
.ModifyString"/> is set.
439
public static Size MeasureText(ReadOnlySpan<char> text, Font? font, Size proposedSize,
TextFormatFlags
flags)
483
TextFormatFlags
flags)
501
/// Thrown if <see cref="
TextFormatFlags
.ModifyString"/> is set.
508
TextFormatFlags
flags)
515
TextFormatFlags
flags =
TextFormatFlags
.Bottom)
531
TextFormatFlags
flags =
TextFormatFlags
.Bottom)
602
internal static ApplyGraphicsProperties GetApplyStateFlags(IDeviceContext deviceContext,
TextFormatFlags
textFormatFlags)
610
if (textFormatFlags.HasFlag(
TextFormatFlags
.PreserveGraphicsClipping))
615
if (textFormatFlags.HasFlag(
TextFormatFlags
.PreserveGraphicsTranslateTransform))
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (5)
84
DrawText(
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter
85
|
TextFormatFlags
.SingleLine |
TextFormatFlags
.HidePrefix);
91
public void DrawText(
TextFormatFlags
flags)
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (5)
365
DrawText(dc, bounds, textToDraw, drawDisabled,
TextFormatFlags
.HorizontalCenter);
371
public void DrawText(IDeviceContext dc, Rectangle bounds, string? textToDraw, bool drawDisabled,
TextFormatFlags
flags)
379
internal void DrawText(HDC dc, Rectangle bounds, string? textToDraw, bool drawDisabled,
TextFormatFlags
flags)
658
public unsafe Rectangle GetTextExtent(IDeviceContext dc, string textToDraw,
TextFormatFlags
flags)
681
public unsafe Rectangle GetTextExtent(IDeviceContext dc, Rectangle bounds, string textToDraw,
TextFormatFlags
flags)
System.Windows.Forms.Design (21)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (5)
197
TextFormatFlags
formatFlags =
TextFormatFlags
.HorizontalCenter |
TextFormatFlags
.VerticalCenter;
224
formatFlags |=
TextFormatFlags
.NoPrefix;
228
formatFlags |=
TextFormatFlags
.HidePrefix;
System\Windows\Forms\Design\DesignBindingPicker.cs (6)
1851
TextFormatFlags
formatFlags =
1852
TextFormatFlags
.WordBreak |
1853
TextFormatFlags
.EndEllipsis |
1854
TextFormatFlags
.TextBoxControl |
1855
TextFormatFlags
.PreserveGraphicsClipping |
1856
TextFormatFlags
.PreserveGraphicsTranslateTransform;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (2)
194
TextRenderer.DrawText(g, name, drawFont, new Point(watermarkX, watermarkY), waterMarkTextColor,
TextFormatFlags
.PreserveGraphicsClipping |
TextFormatFlags
.PreserveGraphicsTranslateTransform);
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (8)
780
TextFormatFlags
format =
TextFormatFlags
.Top |
TextFormatFlags
.Left;
897
TextFormatFlags
flags =
TextFormatFlags
.EndEllipsis |
TextFormatFlags
.PreserveGraphicsTranslateTransform |
TextFormatFlags
.PreserveGraphicsClipping;
900
flags |=
TextFormatFlags
.RightToLeft;