27 writes to Left
System.Windows.Forms (24)
System\Windows\Forms\Control.cs (2)
9696
padding.
Left
= (int)Math.Round(padding.Left * dx);
9698
margins.
Left
= (int)Math.Round(margins.Left * dx);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (1)
275
value.
Left
= Math.Max(0, value.Left);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
202
toolStripPadding.
Left
= 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
139
padding.
Left
= 0;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (15)
119
cellMargin.
Left
-= spaceToFree;
126
cellMargin.
Left
= 0;
196
cellMargin.
Left
-= requiredSpace;
203
cellMargin.
Left
= 0;
217
cellMargin.
Left
+= spaceToFree;
265
cellMargin.
Left
-= requiredSpace;
272
cellMargin.
Left
= 0;
306
cellMargin.
Left
+= spaceToFree;
337
cellMargin.
Left
+= freedSpace;
370
nextCellMargin.
Left
+= spaceOccupiedByCell;
463
nextCellMargin.
Left
-= requiredSpace;
481
nextCellMargin.
Left
= Math.Max(0, nextCellMargin.Left - freedSpace);
496
lastCellMargin.
Left
= Math.Max(0, locationToDrag.X - nextCell.Bounds.Right);
517
newCellMargin.
Left
= freedSpace - controlToDragWidth;
543
cellMargin.
Left
= Math.Max(0, locationToDrag.X - Row.Margin.Left);
System\Windows\Forms\Layout\LayoutUtils.cs (2)
145
padding.
Left
= Math.Max(0, padding.Left);
424
padding.
Left
= temp;
System\Windows\Forms\Layout\TableLayout.cs (1)
1258
(elementMargin.
Left
, elementMargin.Right) = (elementMargin.Right, elementMargin.Left);
System\Windows\Forms\Scrolling\ScrollableControl.DockPaddingEdgesConverter.cs (1)
133
padding.
Left
= value;
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Padding.cs (1)
175
private void ResetLeft() =>
Left
= 0;
System.Windows.Forms.Tests (2)
System\Windows\Forms\PaddingTests.cs (2)
153
Left
= value
188
Left
= value
150 references to Left
PresentationUI (19)
MS\Internal\Documents\SignatureSummaryDialog.cs (19)
230
Padding columnPadding = new Padding(CellPadding.
Left
, 3, 0, 3);
544
IntentTextWidth - CellPadding.
Left
- CellPadding.Right).Height;
554
SummaryNameTextWidth - CellPadding.
Left
- CellPadding.Right).Height;
558
SignByTextWidth - CellPadding.
Left
- CellPadding.Right).Height;
562
LocaleTextWidth - CellPadding.
Left
- CellPadding.Right).Height;
569
SummaryNameTextWidth - CellPadding.
Left
- CellPadding.Right).Height;
645
intentXOffset = bounds.Right + CellPadding.Right + CellPadding.
Left
-
650
iconXOffset = bounds.Left + CellPadding.
Left
;
651
statusXOffset = bounds.Left + IconWidth + CellPadding.
Left
;
652
intentXOffset = bounds.Left + IconWidth + SummaryNameTextWidth + CellPadding.
Left
;
662
IconWidth - CellPadding.
Left
- CellPadding.Right,
672
SummaryNameTextWidth - CellPadding.
Left
- CellPadding.Right,
680
IntentTextWidth - CellPadding.
Left
- CellPadding.Right,
694
signByXOffset = bounds.Left + CellPadding.
Left
+ CellPadding.Right;
695
localeXOffset = bounds.Left + CellPadding.
Left
+ CellPadding.Right + SignByTextWidth;
699
signByXOffset = bounds.Left + IconWidth + SummaryNameTextWidth + IntentTextWidth + SignByTextWidth + CellPadding.
Left
;
700
localeXOffset = bounds.Left + IconWidth + SummaryNameTextWidth + IntentTextWidth + CellPadding.
Left
;
707
SignByTextWidth - CellPadding.
Left
- CellPadding.Right,
715
LocaleTextWidth - CellPadding.
Left
- CellPadding.Right,
System.Windows.Forms (63)
System\Windows\Forms\Control.cs (2)
9696
padding.Left = (int)Math.Round(padding.
Left
* dx);
9698
margins.Left = (int)Math.Round(margins.
Left
* dx);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
704
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (5)
3600
rectPadding.X = bounds.Right - cellStyle.Padding.
Left
;
3601
rectPadding.Width = cellStyle.Padding.
Left
;
3607
rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.
Left
, bounds.Height);
3612
rectPadding.X = bounds.Left + cellStyle.Padding.
Left
;
3804
borderAndPaddingWidths.X += cellStyle.Padding.
Left
;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (3)
266
if (value.
Left
< 0 || value.Right < 0 || value.Top < 0 || value.Bottom < 0)
275
value.Left = Math.Max(0, value.
Left
);
290
Debug.Assert(value.
Left
>= 0);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1127
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (2)
785
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
885
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
532
borderAndPaddingWidths.X += cellStyle.Padding.
Left
;
1949
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
769
DataGridView!.RightToLeftInternal ? cellStyle.Padding.Right : cellStyle.Padding.
Left
,
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
931
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (2)
666
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
750
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
699
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
289
valBounds.Offset(cellStyle.Padding.
Left
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
164
padding.
Left
,
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4185
gripRectangle.X += Grip.Margin.
Left
;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (1)
66
_dropDownArrowRect = new Rectangle(_dropDownArrowPadding.
Left
, 0, s_dropDownArrowSize.Width, _ownerItem.Bounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (6)
76
int textPadding = (rightToLeft == RightToLeft.Yes) ? _textPadding.Right : _textPadding.
Left
;
363
nextPoint = new Point(_checkPadding.
Left
, _checkPadding.Top);
367
nextPoint.X = _checkRectangle.Right + _checkPadding.Right + _imagePadding.
Left
;
419
nextPoint.X = _imageMarginBounds.Right + _textPadding.
Left
;
424
nextPoint.X = _textRectangle.Right + _textPadding.Right + _arrowPadding.
Left
;
447
trimPadding += _textPadding.
Left
;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
1075
rect.X -= dropDownMenu.Padding.
Left
;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (2)
869
index = (clientLocation.Y <= Padding.
Left
) ? 0 : index;
875
index = (clientLocation.X <= Padding.
Left
) ? 0 : index;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (2)
433
margins[i] = c.Margin.
Left
;
443
cachedBounds.X -= Math.Max(0, margins[i] - c.Margin.
Left
);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (7)
71
dragBounds.X -= Row.Margin.
Left
+ ToolStripPanel.Padding.
Left
+ 4;
117
if (cellMargin.
Left
>= spaceToFree)
125
spaceToFree -= lastCellOnRow.Margin.
Left
;
461
if (nextCellMargin.
Left
> requiredSpace)
481
nextCellMargin.Left = Math.Max(0, nextCellMargin.
Left
- freedSpace);
543
cellMargin.Left = Math.Max(0, locationToDrag.X - Row.Margin.
Left
);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (1)
68
dragBounds.Width += (nextRowBounds.Width >> 2) + Row.Margin.Right + ToolStripPanel.RowsInternal[index + 1].Margin.
Left
;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
1477
bounds.X += dropDownMenu.Padding.
Left
- 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (2)
143
insertionRect = new Rectangle(_owner.Margin.
Left
, item.Bounds.Top, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth);
146
insertionRect = new Rectangle(_owner.Margin.
Left
, item.Bounds.Bottom, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (3)
300
lastRight = x - itemMargin.
Left
;
311
x = lastLeft + itemMargin.
Left
;
430
int x = _displayRectangle.Left + itemMargin.
Left
;
System\Windows\Forms\Layout\ArrangedElement.cs (2)
74
Debug.Assert((value.Right >= 0 && value.
Left
>= 0 && value.Top >= 0 && value.Bottom >= 0), "who's setting margin negative?");
86
Debug.Assert((value.Right >= 0 && value.
Left
>= 0 && value.Top >= 0 && value.Bottom >= 0), "who's setting padding negative?");
System\Windows\Forms\Layout\DefaultLayout.cs (1)
677
preferredSizeForAnchoring.Width -= containerPadding.
Left
;
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (1)
137
newBounds.X = DisplayRect.Right - bounds.X - bounds.Width + ElementProxy.Margin.
Left
- ElementProxy.Margin.Right;
System\Windows\Forms\Layout\FlowLayout.cs (2)
322
Debug.Assert(container.Children[0].Bounds.X == margin.
Left
+ container.DisplayRectangle.X);
330
Debug.Assert(container.Children[0].Bounds.X == margin.
Left
+ container.DisplayRectangle.X);
System\Windows\Forms\Layout\LayoutUtils.cs (4)
145
padding.Left = Math.Max(0, padding.
Left
);
374
rect.X -= padding.
Left
;
383
rect.X += padding.
Left
;
423
padding.Top = padding.
Left
;
System\Windows\Forms\Layout\TableLayout.cs (1)
1258
(elementMargin.Left, elementMargin.Right) = (elementMargin.Right, elementMargin.
Left
);
System\Windows\Forms\Scrolling\ScrollableControl.DockPaddingEdgesConverter.cs (2)
66
(_owner.Padding.
Left
!= -1
123
get => _owner is null ? _left : _owner.Padding.
Left
;
System.Windows.Forms.Design (5)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
192
lines.Add(new SnapLine(SnapLineType.Vertical, loc.X - _primaryControl.Margin.
Left
, SnapLine.MarginLeft, SnapLinePriority.Always));
System\Windows\Forms\Design\ControlCommandSet.cs (1)
489
lines.Add(new SnapLine(SnapLineType.Vertical, pt.X - primaryControl.Margin.
Left
, SnapLine.MarginLeft, SnapLinePriority.Always));
System\Windows\Forms\Design\ControlDesigner.cs (1)
362
snapLines.Add(new SnapLine(SnapLineType.Vertical, -margin.
Left
, SnapLine.MarginLeft, SnapLinePriority.Always));
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (2)
153
bounds.Left - (IsRtl ? margin.Right : margin.
Left
),
209
bounds.X -= IsRtl ? margin.Right : margin.
Left
;
System.Windows.Forms.Primitives (18)
System\Windows\Forms\Internals\ScaleHelper.cs (1)
286
ScaleToDpi(logicalPadding.
Left
, dpi),
System\Windows\Forms\Padding.cs (13)
122
public readonly int Horizontal =>
Left
+ Right;
139
Left
== other.
Left
148
new(p1.
Left
+ p2.
Left
, p1.Top + p2.Top, p1.Right + p2.Right, p1.Bottom + p2.Bottom);
154
new(p1.
Left
- p2.
Left
, p1.Top - p2.Top, p1.Right - p2.Right, p1.Bottom - p2.Bottom);
160
p1.
Left
== p2.
Left
&& p1.Top == p2.Top && p1.Right == p2.Right && p1.Bottom == p2.Bottom;
167
public override readonly int GetHashCode() => HashCode.Combine(
Left
, Top, Right, Bottom);
169
public override readonly string ToString() => $"{{Left={
Left
},Top={Top},Right={Right},Bottom={Bottom}}}";
197
Debug.Assert(All ==
Left
&&
Left
== Top && Top == Right && Right == Bottom, "_all is true, but All/Left/Top/Right/Bottom inconsistent.");
System\Windows\Forms\PaddingConverter.cs (4)
52
new object[] { padding.
Left
, padding.Top, padding.Right, padding.Bottom });
62
new object[] { padding.
Left
, padding.Top, padding.Right, padding.Bottom });
94
(int)propertyValues[nameof(Padding.
Left
)]!,
115
return properties.Sort([nameof(Padding.All), nameof(Padding.
Left
), nameof(Padding.Top), nameof(Padding.Right), nameof(Padding.Bottom)]);
System.Windows.Forms.Tests (45)
System\Windows\Forms\DockPaddingEdgesTests.cs (5)
50
Assert.Equal(expectedValue, owner.Padding.
Left
);
93
Assert.Equal(expectedLeft, owner.Padding.
Left
);
136
Assert.Equal(1, owner.Padding.
Left
);
179
Assert.Equal(1, owner.Padding.
Left
);
222
Assert.Equal(1, owner.Padding.
Left
);
System\Windows\Forms\PaddingConverterTests.cs (19)
149
{ nameof(Padding.
Left
), 1 },
166
{ nameof(Padding.
Left
), expected.
Left
},
188
{ nameof(Padding.
Left
), 2 },
199
{ nameof(Padding.
Left
), 2 },
209
{ nameof(Padding.
Left
), 2 },
221
{ nameof(Padding.
Left
), new object() },
232
{ nameof(Padding.
Left
), null },
254
{ nameof(Padding.
Left
), 2 },
265
{ nameof(Padding.
Left
), 2 },
276
{ nameof(Padding.
Left
), 2 },
287
{ nameof(Padding.
Left
), 2 },
298
{ nameof(Padding.
Left
), 2 },
309
{ nameof(Padding.
Left
), 2 },
320
{ nameof(Padding.
Left
), 2 },
331
{ nameof(Padding.
Left
), 2 },
342
{ nameof(Padding.
Left
), 2 },
380
{ nameof(Padding.
Left
), 2 },
405
Assert.Equal(nameof(Padding.
Left
), properties[1].Name);
System\Windows\Forms\PaddingTests.cs (21)
17
Assert.Equal(0, padding.
Left
);
32
Assert.Equal(all, padding.
Left
);
54
Assert.Equal(left, padding.
Left
);
68
Assert.Equal(0, padding.
Left
);
86
Assert.Equal(value, padding.
Left
);
104
Assert.Equal(0, ((Padding)boxedPadding).
Left
);
124
Assert.Equal(0, ((Padding)boxedPadding).
Left
);
141
Assert.Equal(value, padding.
Left
);
156
Assert.Equal(value, padding.
Left
);
168
PropertyDescriptor property = properties[nameof(Padding.
Left
)];
174
Assert.Equal(0, ((Padding)boxedPadding).
Left
);
191
Assert.Equal(value, padding.
Left
);
206
Assert.Equal(1, padding.
Left
);
224
Assert.Equal(1, ((Padding)boxedPadding).
Left
);
241
Assert.Equal(5, padding.
Left
);
256
Assert.Equal(1, padding.
Left
);
274
Assert.Equal(1, ((Padding)boxedPadding).
Left
);
291
Assert.Equal(5, padding.
Left
);
306
Assert.Equal(1, padding.
Left
);
324
Assert.Equal(1, ((Padding)boxedPadding).
Left
);
341
Assert.Equal(5, padding.
Left
);