28 writes to Margin
System.Windows.Forms (4)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
793
Margin
= DefaultGripMargin
845
Grip.
Margin
= value;
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
235
Margin
= DefaultMargin;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
512
menuItem.
Margin
= Margin;
System.Windows.Forms.Design (7)
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (1)
152
Margin
= Padding.Empty,
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
24
Margin
= Padding.Empty;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (5)
890
_centerTextBox.
Margin
= new Padding(1, 2, 1, 3);
894
_centerTextBox.
Margin
= new Padding(1);
1374
Margin
= new Padding(1)
1379
_centerLabel.
Margin
= new Padding(1, 2, 1, 3);
1402
Margin
= new Padding(1)
System.Windows.Forms.Tests (17)
System\Windows\Forms\ToolStripItemTests.cs (16)
5903
Margin
= value
5908
item.
Margin
= value;
5934
item.
Margin
= value;
5940
item.
Margin
= value;
5980
item.
Margin
= value;
5989
item.
Margin
= value;
6025
item.
Margin
= value;
6031
item.
Margin
= value;
6071
item.
Margin
= value;
6080
item.
Margin
= value;
6101
item.
Margin
= new Padding(1, 2, 3, 4);
6117
item.
Margin
= new Padding(1, 2, 3, 4);
6495
Margin
= new Padding(1, 2, 3, 4),
7028
Margin
= new Padding(1, 2, 3, 4),
12167
Margin
= new Padding(1, 2, 3, 4)
14206
item.
Margin
= new Padding(1, 2, 3, 4);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
292
Margin
= new Padding(1),
120 references to Margin
System.Windows.Forms (27)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (12)
738
int gripwidth = Grip.GripThickness + Grip.
Margin
.Horizontal;
745
int gripheight = Grip.GripThickness + Grip.
Margin
.Vertical;
841
return Grip.
Margin
;
2290
Padding itemMargin = item.
Margin
;
2312
Padding overflowItemMargin = overflowItem.
Margin
;
2350
Padding itemMargin = item.
Margin
;
2371
Padding overflowItemMargin = overflowItem.
Margin
;
4179
gripRectangle.Y = Math.Max(0, displayRect.Top - Grip.
Margin
.Top);
4184
gripRectangle.X = ClientRectangle.Right - gripRectangle.Width - Grip.
Margin
.Horizontal;
4185
gripRectangle.X += Grip.
Margin
.Left;
4189
gripRectangle.X -= Grip.
Margin
.Right;
4196
gripRectangle.Y = displayRect.Top - (Grip.GripThickness + Grip.
Margin
.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (3)
96
rect.Y += UpScrollButton.Height + UpScrollButton.
Margin
.Vertical;
97
rect.Height -= UpScrollButton.Height + UpScrollButton.
Margin
.Vertical + DownScrollButton.Height + DownScrollButton.
Margin
.Vertical;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (4)
1268
if (
Margin
!= value)
3279
if (_state[s_stateUseAmbientMargin] &&
Margin
!= DefaultMargin)
3325
/// Determines if the <see cref="
Margin
"/> property needs to be persisted.
3328
private bool ShouldSerializeMargin() =>
Margin
!= DefaultMargin;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
512
menuItem.Margin =
Margin
;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (1)
175
bounds.Inflate(_owner.DisplayedItems[i].
Margin
.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (6)
41
return overflowButtonSize + toolStrip.OverflowButton.
Margin
.Size;
88
currentWidth += itemSize.Width + item.
Margin
.Horizontal;
139
currentHeight += itemSize.Height + item.
Margin
.Vertical;
289
Padding itemMargin = item.
Margin
;
429
Padding itemMargin = item.
Margin
;
577
Padding itemMargin = item.
Margin
;
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1390
bounds.Inflate(wb.Items[i].
Margin
.Size);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (3)
897
_centerTextBox.Size = _miniToolStrip.DisplayRectangle.Size - _centerTextBox.
Margin
.Size;
1384
_centerLabel.Size = _miniToolStrip.DisplayRectangle.Size - _centerLabel.
Margin
.Size;
1404
_addItemButton.Size = _miniToolStrip.DisplayRectangle.Size - _addItemButton.
Margin
.Size;
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\DesignerToolStripControlHostTests.cs (1)
17
host.
Margin
.Should().Be(Padding.Empty);
System.Windows.Forms.Tests (88)
System\Windows\Forms\ToolStripButtonTests.cs (6)
68
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
149
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
236
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
326
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
414
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
512
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
System\Windows\Forms\ToolStripControlHostTests.cs (22)
97
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1401
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1412
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1422
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1432
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1444
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1472
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1485
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1497
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1509
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1523
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
1540
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3115
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3126
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3137
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3148
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3159
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3189
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3201
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3213
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3225
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
3237
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
68
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
157
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
256
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
364
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
System\Windows\Forms\ToolStripItemTests.cs (49)
67
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
152
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
247
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
5889
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
5905
Assert.Equal(value, item.
Margin
);
5909
Assert.Equal(value, item.
Margin
);
5935
Assert.Equal(value, item.
Margin
);
5941
Assert.Equal(value, item.
Margin
);
5981
Assert.Equal(value, item.
Margin
);
5990
Assert.Equal(value, item.
Margin
);
6026
Assert.Equal(value, item.
Margin
);
6032
Assert.Equal(value, item.
Margin
);
6072
Assert.Equal(value, item.
Margin
);
6081
Assert.Equal(value, item.
Margin
);
6097
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.
Margin
)];
6102
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
6106
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
6113
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.
Margin
)];
6118
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
6122
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
6451
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
6459
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
6467
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
6475
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
6484
Assert.Equal(new Padding(0, 2, 0, 0), item.
Margin
);
6501
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
6509
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
6517
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
6525
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
6534
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
6978
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
6987
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
6995
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
7003
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
7012
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
7035
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
7044
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
7052
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
7060
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
7069
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
12152
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
12158
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
12182
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
12188
Assert.Equal(new Padding(1, 2, 3, 4), item.
Margin
);
12256
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
12264
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
14203
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
14208
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
14212
Assert.Equal(new Padding(0, 1, 0, 2), item.
Margin
);
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
74
Assert.Equal(Padding.Empty, item.
Margin
);
337
clone.
Margin
.Should().Be(original.
Margin
);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
65
Assert.Equal(Padding.Empty, item.
Margin
);
System\Windows\Forms\ToolStripTests.cs (3)
2737
Assert.Equal(value, grip.
Margin
);
2749
Assert.Equal(value, grip.
Margin
);
2755
Assert.Equal(value, grip.
Margin
);