28 writes to Margin
System.Windows.Forms (4)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
791Margin = DefaultGripMargin 843Grip.Margin = value;
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
235Margin = DefaultMargin;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
512menuItem.Margin = Margin;
System.Windows.Forms.Design (7)
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (1)
152Margin = Padding.Empty,
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
24Margin = Padding.Empty;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (5)
890_centerTextBox.Margin = new Padding(1, 2, 1, 3); 894_centerTextBox.Margin = new Padding(1); 1374Margin = new Padding(1) 1379_centerLabel.Margin = new Padding(1, 2, 1, 3); 1402Margin = new Padding(1)
System.Windows.Forms.Tests (17)
System\Windows\Forms\ToolStripItemTests.cs (16)
5903Margin = value 5908item.Margin = value; 5934item.Margin = value; 5940item.Margin = value; 5980item.Margin = value; 5989item.Margin = value; 6025item.Margin = value; 6031item.Margin = value; 6071item.Margin = value; 6080item.Margin = value; 6101item.Margin = new Padding(1, 2, 3, 4); 6117item.Margin = new Padding(1, 2, 3, 4); 6495Margin = new Padding(1, 2, 3, 4), 7028Margin = new Padding(1, 2, 3, 4), 12148Margin = new Padding(1, 2, 3, 4) 14187item.Margin = new Padding(1, 2, 3, 4);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
292Margin = new Padding(1),
120 references to Margin
System.Windows.Forms (27)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (12)
736int gripwidth = Grip.GripThickness + Grip.Margin.Horizontal; 743int gripheight = Grip.GripThickness + Grip.Margin.Vertical; 839return Grip.Margin; 2288Padding itemMargin = item.Margin; 2310Padding overflowItemMargin = overflowItem.Margin; 2348Padding itemMargin = item.Margin; 2369Padding overflowItemMargin = overflowItem.Margin; 4177gripRectangle.Y = Math.Max(0, displayRect.Top - Grip.Margin.Top); 4182gripRectangle.X = ClientRectangle.Right - gripRectangle.Width - Grip.Margin.Horizontal; 4183gripRectangle.X += Grip.Margin.Left; 4187gripRectangle.X -= Grip.Margin.Right; 4194gripRectangle.Y = displayRect.Top - (Grip.GripThickness + Grip.Margin.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (3)
96rect.Y += UpScrollButton.Height + UpScrollButton.Margin.Vertical; 97rect.Height -= UpScrollButton.Height + UpScrollButton.Margin.Vertical + DownScrollButton.Height + DownScrollButton.Margin.Vertical;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (4)
1268if (Margin != value) 3271if (_state[s_stateUseAmbientMargin] && Margin != DefaultMargin) 3317/// Determines if the <see cref="Margin"/> property needs to be persisted. 3320private bool ShouldSerializeMargin() => Margin != DefaultMargin;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
512menuItem.Margin = Margin;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (1)
175bounds.Inflate(_owner.DisplayedItems[i].Margin.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (6)
41return overflowButtonSize + toolStrip.OverflowButton.Margin.Size; 88currentWidth += itemSize.Width + item.Margin.Horizontal; 139currentHeight += itemSize.Height + item.Margin.Vertical; 289Padding itemMargin = item.Margin; 429Padding itemMargin = item.Margin; 577Padding itemMargin = item.Margin;
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1390bounds.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)
17host.Margin.Should().Be(Padding.Empty);
System.Windows.Forms.Tests (88)
System\Windows\Forms\ToolStripButtonTests.cs (6)
68Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 149Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 236Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 326Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 414Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 512Assert.Equal(new Padding(0, 1, 0, 2), item.Margin);
System\Windows\Forms\ToolStripControlHostTests.cs (22)
97Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1401Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1412Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1422Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1432Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1444Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1472Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1485Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1497Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1509Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1523Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 1540Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3115Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3126Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3137Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3148Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3159Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3189Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3201Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3213Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3225Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 3237Assert.Equal(new Padding(0, 1, 0, 2), item.Margin);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
68Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 157Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 256Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 364Assert.Equal(new Padding(0, 1, 0, 2), item.Margin);
System\Windows\Forms\ToolStripItemTests.cs (49)
67Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 152Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 247Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 5889Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 5905Assert.Equal(value, item.Margin); 5909Assert.Equal(value, item.Margin); 5935Assert.Equal(value, item.Margin); 5941Assert.Equal(value, item.Margin); 5981Assert.Equal(value, item.Margin); 5990Assert.Equal(value, item.Margin); 6026Assert.Equal(value, item.Margin); 6032Assert.Equal(value, item.Margin); 6072Assert.Equal(value, item.Margin); 6081Assert.Equal(value, item.Margin); 6097PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.Margin)]; 6102Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 6106Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 6113PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.Margin)]; 6118Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 6122Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 6451Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 6459Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 6467Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 6475Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 6484Assert.Equal(new Padding(0, 2, 0, 0), item.Margin); 6501Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 6509Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 6517Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 6525Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 6534Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 6978Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 6987Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 6995Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 7003Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 7012Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 7035Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 7044Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 7052Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 7060Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 7069Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 12133Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 12139Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 12163Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 12169Assert.Equal(new Padding(1, 2, 3, 4), item.Margin); 12237Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 12245Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 14184Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 14189Assert.Equal(new Padding(0, 1, 0, 2), item.Margin); 14193Assert.Equal(new Padding(0, 1, 0, 2), item.Margin);
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
74Assert.Equal(Padding.Empty, item.Margin); 337clone.Margin.Should().Be(original.Margin);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
65Assert.Equal(Padding.Empty, item.Margin);
System\Windows\Forms\ToolStripTests.cs (3)
2737Assert.Equal(value, grip.Margin); 2749Assert.Equal(value, grip.Margin); 2755Assert.Equal(value, grip.Margin);