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