17 writes to Right
System.Windows.Forms (14)
System\Windows\Forms\Control.cs (2)
9697
padding.
Right
= (int)Math.Round(padding.Right * dx);
9699
margins.
Right
= (int)Math.Round(margins.Right * dx);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (1)
276
value.
Right
= Math.Max(0, value.Right);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
140
padding.
Right
= 0;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (6)
120
cellMargin.
Right
= 0;
127
cellMargin.
Right
= 0;
197
cellMargin.
Right
= 0;
204
cellMargin.
Right
= 0;
266
cellMargin.
Right
= 0;
273
cellMargin.
Right
= 0;
System\Windows\Forms\Layout\LayoutUtils.cs (2)
147
padding.
Right
= Math.Max(0, padding.Right);
428
padding.
Right
= 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)
156
padding.
Right
= value;
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Padding.cs (1)
177
private void ResetRight() =>
Right
= 0;
System.Windows.Forms.Tests (2)
System\Windows\Forms\PaddingTests.cs (2)
253
Right
= value
288
Right
= value
126 references to Right
PresentationUI (15)
MS\Internal\Documents\SignatureSummaryDialog.cs (15)
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;
640
iconXOffset = bounds.Right - (CellPadding.
Right
+ IconWidth);
644
statusXOffset = bounds.Right + CellPadding.
Right
- (IconWidth + SummaryNameTextWidth);
645
intentXOffset = bounds.Right + CellPadding.
Right
+ 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;
707
SignByTextWidth - CellPadding.Left - CellPadding.
Right
,
715
LocaleTextWidth - CellPadding.Left - CellPadding.
Right
,
System.Windows.Forms (43)
System\Windows\Forms\Control.cs (2)
9697
padding.Right = (int)Math.Round(padding.
Right
* dx);
9699
margins.Right = (int)Math.Round(margins.
Right
* dx);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
700
valBounds.Offset(cellStyle.Padding.
Right
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (5)
3598
rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.
Right
, bounds.Height);
3603
rectPadding.X = bounds.Left + cellStyle.Padding.
Right
;
3609
rectPadding.X = bounds.Right - cellStyle.Padding.
Right
;
3610
rectPadding.Width = cellStyle.Padding.
Right
;
3806
borderAndPaddingWidths.Width += cellStyle.Padding.
Right
;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (3)
266
if (value.Left < 0 || value.
Right
< 0 || value.Top < 0 || value.Bottom < 0)
276
value.Right = Math.Max(0, value.
Right
);
291
Debug.Assert(value.
Right
>= 0);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1123
valBounds.Offset(cellStyle.Padding.
Right
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (2)
781
valBounds.Offset(cellStyle.Padding.
Right
, cellStyle.Padding.Top);
881
valBounds.Offset(cellStyle.Padding.
Right
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
534
borderAndPaddingWidths.Width += cellStyle.Padding.
Right
;
1945
valBounds.Offset(cellStyle.Padding.
Right
, 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)
927
valBounds.Offset(cellStyle.Padding.
Right
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (2)
662
valBounds.Offset(cellStyle.Padding.
Right
, cellStyle.Padding.Top);
746
valBounds.Offset(cellStyle.Padding.
Right
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
695
valBounds.Offset(cellStyle.Padding.
Right
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
285
valBounds.Offset(cellStyle.Padding.
Right
, cellStyle.Padding.Top);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4189
gripRectangle.X -= Grip.Margin.
Right
;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (5)
76
int textPadding = (rightToLeft == RightToLeft.Yes) ? _textPadding.
Right
: _textPadding.Left;
367
nextPoint.X = _checkRectangle.Right + _checkPadding.
Right
+ _imagePadding.Left;
424
nextPoint.X = _textRectangle.Right + _textPadding.
Right
+ _arrowPadding.Left;
429
_maxItemSize.Width = (_arrowRectangle.Right + _arrowPadding.
Right
) - _imageMarginBounds.Left;
437
trimPadding += _textPadding.
Right
;
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)
1485
bounds.Width = dropDownMenu.Width - bounds.X - dropDownMenu.Padding.
Right
;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
298
x = lastRight - (itemMargin.
Right
+ itemSize.Width);
313
lastLeft = x + itemSize.Width + itemMargin.
Right
;
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\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 (1)
325
Debug.Assert(container.Children[0].Bounds.X == container.DisplayRectangle.X + container.DisplayRectangle.Width - container.Children[0].Bounds.Width - margin.
Right
);
System\Windows\Forms\Layout\LayoutUtils.cs (2)
147
padding.Right = Math.Max(0, padding.
Right
);
427
padding.Bottom = padding.
Right
;
System\Windows\Forms\Layout\TableLayout.cs (1)
1258
(elementMargin.Left, elementMargin.Right) = (elementMargin.
Right
, elementMargin.Left);
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
344
_scrollMargin.Width += Padding.
Right
;
466
ctlRight += current.Margin.
Right
;
System\Windows\Forms\Scrolling\ScrollableControl.DockPaddingEdgesConverter.cs (2)
68
|| _owner.Padding.
Right
!= -1
146
get => _owner is null ? _right : _owner.Padding.
Right
;
System.Windows.Forms.Design (5)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
184
lines.Add(new SnapLine(SnapLineType.Vertical, loc.X + _primaryControl.Margin.
Right
, SnapLine.MarginRight, SnapLinePriority.Always));
System\Windows\Forms\Design\ControlCommandSet.cs (1)
481
lines.Add(new SnapLine(SnapLineType.Vertical, pt.X + primaryControl.Width + primaryControl.Margin.
Right
, SnapLine.MarginRight, SnapLinePriority.Always));
System\Windows\Forms\Design\ControlDesigner.cs (1)
363
snapLines.Add(new SnapLine(SnapLineType.Vertical, margin.
Right
+ width, SnapLine.MarginRight, 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)
288
ScaleToDpi(logicalPadding.
Right
, dpi),
System\Windows\Forms\Padding.cs (13)
122
public readonly int Horizontal => Left +
Right
;
141
&&
Right
== other.
Right
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 });
96
(int)propertyValues[nameof(Padding.
Right
)]!,
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)
52
Assert.Equal(expectedValue, owner.Padding.
Right
);
95
Assert.Equal(3, owner.Padding.
Right
);
138
Assert.Equal(3, owner.Padding.
Right
);
181
Assert.Equal(expectedRight, owner.Padding.
Right
);
224
Assert.Equal(3, owner.Padding.
Right
);
System\Windows\Forms\PaddingConverterTests.cs (19)
151
{ nameof(Padding.
Right
), 3 },
168
{ nameof(Padding.
Right
), expected.
Right
},
190
{ nameof(Padding.
Right
), 3 },
201
{ nameof(Padding.
Right
), 3 },
211
{ nameof(Padding.
Right
), 3 },
223
{ nameof(Padding.
Right
), 3 },
234
{ nameof(Padding.
Right
), 3 },
244
{ nameof(Padding.
Right
), 3 },
256
{ nameof(Padding.
Right
), 3 },
267
{ nameof(Padding.
Right
), 3 },
277
{ nameof(Padding.
Right
), 3 },
289
{ nameof(Padding.
Right
), new object() },
300
{ nameof(Padding.
Right
), null },
322
{ nameof(Padding.
Right
), 3 },
333
{ nameof(Padding.
Right
), 3 },
344
{ nameof(Padding.
Right
), 3 }
382
{ nameof(Padding.
Right
), 3 },
407
Assert.Equal(nameof(Padding.
Right
), properties[3].Name);
System\Windows\Forms\PaddingTests.cs (21)
19
Assert.Equal(0, padding.
Right
);
34
Assert.Equal(all, padding.
Right
);
56
Assert.Equal(right, padding.
Right
);
70
Assert.Equal(0, padding.
Right
);
88
Assert.Equal(value, padding.
Right
);
106
Assert.Equal(0, ((Padding)boxedPadding).
Right
);
126
Assert.Equal(0, ((Padding)boxedPadding).
Right
);
143
Assert.Equal(value, padding.
Right
);
158
Assert.Equal(3, padding.
Right
);
176
Assert.Equal(3, ((Padding)boxedPadding).
Right
);
193
Assert.Equal(5, padding.
Right
);
208
Assert.Equal(3, padding.
Right
);
226
Assert.Equal(3, ((Padding)boxedPadding).
Right
);
243
Assert.Equal(5, padding.
Right
);
258
Assert.Equal(value, padding.
Right
);
268
PropertyDescriptor property = properties[nameof(Padding.
Right
)];
276
Assert.Equal(0, ((Padding)boxedPadding).
Right
);
293
Assert.Equal(value, padding.
Right
);
308
Assert.Equal(3, padding.
Right
);
326
Assert.Equal(3, ((Padding)boxedPadding).
Right
);
343
Assert.Equal(5, padding.
Right
);