197 references to DesignerUtils
System.Windows.Forms.Design (197)
System\ComponentModel\Design\DesignerActionUI.cs (1)
612
Point point =
DesignerUtils
.LastCursorPoint;
System\Windows\Forms\Design\Behavior\BehaviorService.cs (2)
124
_useSnapLines =
DesignerUtils
.UseSnapLines(_serviceProvider);
847
DesignerUtils
.SyncBrushes();
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (2)
178
if (delta.Width >=
DesignerUtils
.MinDragSize.Width / 2 || delta.Height >=
DesignerUtils
.MinDragSize.Height / 2)
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (2)
154
Rectangle newRect =
DesignerUtils
.GetBoundsForNoResizeSelectionType(_alternativeBounds, SelectionBorderGlyphType.Top);
213
pe.Graphics.FillRectangle(
DesignerUtils
.HoverBrush, Rectangle.Inflate(_bounds, -1, -1));
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (2)
412
temp =
DesignerUtils
.CopyDragObjects(temp, _serviceProviderTarget);
966
DesignerUtils
.GenerateSnapShot(dragControl, out _dragComponents[i].dragImage, i == 0 ? 2 : 1, 1, backColor);
System\Windows\Forms\Design\Behavior\GrabHandleGlyph.cs (47)
33
bounds = new Rectangle(controlBounds.X +
DesignerUtils
.s_handleOverlap -
DesignerUtils
.s_handleSize, controlBounds.Y +
DesignerUtils
.s_handleOverlap -
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize);
38
bounds = new Rectangle(controlBounds.Right -
DesignerUtils
.s_handleOverlap, controlBounds.Y +
DesignerUtils
.s_handleOverlap -
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize);
43
bounds = new Rectangle(controlBounds.Right -
DesignerUtils
.s_handleOverlap, controlBounds.Bottom -
DesignerUtils
.s_handleOverlap,
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize);
48
bounds = new Rectangle(controlBounds.X +
DesignerUtils
.s_handleOverlap -
DesignerUtils
.s_handleSize, controlBounds.Bottom -
DesignerUtils
.s_handleOverlap,
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize);
56
if (controlBounds.Width >= (2 *
DesignerUtils
.s_handleOverlap) + (2 *
DesignerUtils
.s_handleSize))
58
bounds = new Rectangle(controlBounds.X + (controlBounds.Width / 2) - (
DesignerUtils
.s_handleSize / 2), controlBounds.Y +
DesignerUtils
.s_handleOverlap -
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize);
68
if (controlBounds.Width >= (2 *
DesignerUtils
.s_handleOverlap) + (2 *
DesignerUtils
.s_handleSize))
70
bounds = new Rectangle(controlBounds.X + (controlBounds.Width / 2) - (
DesignerUtils
.s_handleSize / 2), controlBounds.Bottom -
DesignerUtils
.s_handleOverlap,
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize);
80
if (controlBounds.Height >= (2 *
DesignerUtils
.s_handleOverlap) + (2 *
DesignerUtils
.s_handleSize))
82
bounds = new Rectangle(controlBounds.X +
DesignerUtils
.s_handleOverlap -
DesignerUtils
.s_handleSize, controlBounds.Y + (controlBounds.Height / 2) - (
DesignerUtils
.s_handleSize / 2),
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize);
92
if (controlBounds.Height >= (2 *
DesignerUtils
.s_handleOverlap) + (2 *
DesignerUtils
.s_handleSize))
94
bounds = new Rectangle(controlBounds.Right -
DesignerUtils
.s_handleOverlap, controlBounds.Y + (controlBounds.Height / 2) - (
DesignerUtils
.s_handleSize / 2),
DesignerUtils
.s_handleSize,
DesignerUtils
.s_handleSize);
113
DesignerUtils
.DrawGrabHandle(pe.Graphics, bounds, _isPrimary);
System\Windows\Forms\Design\Behavior\LockedBorderGlyph.cs (2)
33
bounds =
DesignerUtils
.GetBoundsForSelectionType(controlBounds, type);
42
DesignerUtils
.DrawSelectionBorder(pe.Graphics, bounds);
System\Windows\Forms\Design\Behavior\LockedHandleGlyph.cs (7)
26
bounds = new Rectangle((controlBounds.X +
DesignerUtils
.s_lockHandleOverlap) -
DesignerUtils
.s_lockHandleWidth,
27
(controlBounds.Y +
DesignerUtils
.s_lockHandleOverlap) -
DesignerUtils
.s_lockHandleHeight,
28
DesignerUtils
.s_lockHandleWidth,
DesignerUtils
.s_lockHandleHeight);
37
DesignerUtils
.DrawLockedHandle(pe.Graphics, bounds, _isPrimary);
System\Windows\Forms\Design\Behavior\MiniLockedBorderGlyph.cs (1)
44
bounds =
DesignerUtils
.GetBoundsForSelectionType(controlBounds, type, borderSize);
System\Windows\Forms\Design\Behavior\NoResizeHandleGlyph.cs (5)
35
controlBounds.X -
DesignerUtils
.s_noResizeHandleSize,
36
controlBounds.Y -
DesignerUtils
.s_noResizeHandleSize,
37
DesignerUtils
.s_noResizeHandleSize,
38
DesignerUtils
.s_noResizeHandleSize);
47
DesignerUtils
.DrawNoResizeHandle(pe.Graphics, bounds, _isPrimary);
System\Windows\Forms\Design\Behavior\NoResizeSelectionBorderGlyph.cs (10)
36
bounds =
DesignerUtils
.GetBoundsForNoResizeSelectionType(controlBounds, type);
47
hitBounds.Y -= (
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize) / 2;
48
hitBounds.Height +=
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize;
54
hitBounds.X -= (
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize) / 2;
55
hitBounds.Width +=
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize;
65
DesignerUtils
.DrawSelectionBorder(pe.Graphics, bounds);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (3)
492
if (Math.Abs(_initialPoint.X - mouseLoc.X) >
DesignerUtils
.MinDragSize.Width / 2 || Math.Abs(_initialPoint.Y - mouseLoc.Y) >
DesignerUtils
.MinDragSize.Height / 2)
883
DesignerUtils
.DrawResizeBorder(graphics, newRegion, backColor);
System\Windows\Forms\Design\Behavior\SelectionBorderGlyph.cs (18)
31
bounds =
DesignerUtils
.GetBoundsForSelectionType(controlBounds, type);
45
hitBounds.Y -= (
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize) / 2;
46
hitBounds.Height +=
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize;
56
hitBounds.Y -= (
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize) / 2;
57
hitBounds.Height +=
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize;
67
hitBounds.X -= (
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize) / 2;
68
hitBounds.Width +=
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize;
78
hitBounds.X -= (
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize) / 2;
79
hitBounds.Width +=
DesignerUtils
.s_selectionBorderHitArea -
DesignerUtils
.s_selectionBorderSize;
89
DesignerUtils
.DrawSelectionBorder(pe.Graphics, bounds);
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (7)
213
if (_styles[i].SizeType != SizeType.AutoSize && widths[i] >=
DesignerUtils
.s_minimumSizeDrag)
226
if (_styles[i].SizeType != SizeType.AutoSize && widths[i] >=
DesignerUtils
.s_minimumSizeDrag)
268
if (newWidths[rightIndex] <
DesignerUtils
.s_minimumSizeDrag ||
269
newWidths[leftIndex] <
DesignerUtils
.s_minimumSizeDrag)
293
newRightSize = Math.Max(rightStyleSize - delta,
DesignerUtils
.s_minimumSizeDrag);
301
newLeftSize = Math.Max(leftStyleSize + delta,
DesignerUtils
.s_minimumSizeDrag);
345
DesignerUtils
.s_minimumSizeDrag);
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (5)
316
Rectangle newRectangle = new(mouseLoc.X -
DesignerUtils
.s_boxImageSize / 2, mouseLoc.Y -
DesignerUtils
.s_boxImageSize / 2,
317
DesignerUtils
.s_boxImageSize,
DesignerUtils
.s_boxImageSize);
340
graphics.DrawImage(
DesignerUtils
.BoxImage, newRectangle.Location);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
155
temp =
DesignerUtils
.CopyDragObjects(temp, _serviceProvider);
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (1)
104
host?.Container.Add(item,
DesignerUtils
.GetUniqueSiteName(host, item.Name));
System\Windows\Forms\Design\ButtonBaseDesigner.cs (9)
63
int baseline =
DesignerUtils
.GetTextBaseline(Control, alignment);
107
if ((alignment &
DesignerUtils
.AnyMiddleAlignment) != 0)
118
else if ((alignment &
DesignerUtils
.AnyTopAlignment) != 0)
163
if ((alignment &
DesignerUtils
.AnyMiddleAlignment) != 0)
178
return ((alignment &
DesignerUtils
.AnyTopAlignment) != 0) ? 2 : -2;
194
if ((alignment &
DesignerUtils
.AnyMiddleAlignment) != 0)
203
return ((alignment &
DesignerUtils
.AnyTopAlignment) != 0) ? 4 : -4;
207
return ((alignment &
DesignerUtils
.AnyTopAlignment) != 0) ? 3 : -3;
211
return ((alignment &
DesignerUtils
.AnyTopAlignment) != 0) ? 5 : -5;
System\Windows\Forms\Design\ComboBoxDesigner.cs (1)
35
int baseline =
DesignerUtils
.GetTextBaseline(Control, Drawing.ContentAlignment.TopLeft);
System\Windows\Forms\Design\CommandSet.cs (1)
261
Interval =
DesignerUtils
.s_snapLineDelay
System\Windows\Forms\Design\ComponentTray.cs (5)
1465
gr.FillRectangle(selectionBorderBrush,
DesignerUtils
.GetBoundsForNoResizeSelectionType(innerRect, SelectionBorderGlyphType.Top));
1466
gr.FillRectangle(selectionBorderBrush,
DesignerUtils
.GetBoundsForNoResizeSelectionType(innerRect, SelectionBorderGlyphType.Bottom));
1467
gr.FillRectangle(selectionBorderBrush,
DesignerUtils
.GetBoundsForNoResizeSelectionType(innerRect, SelectionBorderGlyphType.Left));
1468
gr.FillRectangle(selectionBorderBrush,
DesignerUtils
.GetBoundsForNoResizeSelectionType(innerRect, SelectionBorderGlyphType.Right));
1470
DesignerUtils
.DrawNoResizeHandle(gr, glyph.Bounds, first);
System\Windows\Forms\Design\ControlCommandSet.cs (1)
1411
controlSiteContainer =
DesignerUtils
.CheckForNestedContainer(nextControl.Site.Container); // ...necessary to support SplitterPanel components
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
672
ICollection columnTypes =
DesignerUtils
.FilterGenericTypes(discoveryService.GetTypes(typeof(DataGridViewColumn), excludeGlobalTypes: false));
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.Picker.cs (1)
83
ICollection columnTypes =
DesignerUtils
.FilterGenericTypes(discoveryService.GetTypes(s_dataGridViewColumnType, excludeGlobalTypes: false));
System\Windows\Forms\Design\DateTimePickerDesigner.cs (1)
27
int baseline =
DesignerUtils
.GetTextBaseline(Control, ContentAlignment.MiddleLeft);
System\Windows\Forms\Design\DesignBindingPicker.cs (3)
249
DesignerUtils
.ApplyTreeViewThemeStyles(_treeViewCtrl);
605
container =
DesignerUtils
.CheckForNestedContainer(container)!; // ...necessary to support SplitterPanel components
1278
string? uniqueSiteName =
DesignerUtils
.GetUniqueSiteName(_designerHost, bindingSourceName);
System\Windows\Forms\Design\DesignerFrame.cs (1)
164
Size selectionSize =
DesignerUtils
.GetAdornmentDimensions(AdornmentType.Maximum);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
629
List<IComponent> tempList =
DesignerUtils
.CopyDragObjects(_dragControls, Component.Site);
System\Windows\Forms\Design\FormDocumentDesigner.cs (2)
208
snapLine.AdjustOffset(
DesignerUtils
.s_defaultFormPadding);
214
snapLine.AdjustOffset(-
DesignerUtils
.s_defaultFormPadding);
System\Windows\Forms\Design\LabelDesigner.cs (3)
43
int baseline =
DesignerUtils
.GetTextBaseline(Control, alignment);
101
if (((alignment &
DesignerUtils
.AnyMiddleAlignment) != 0) ||
102
((alignment &
DesignerUtils
.AnyTopAlignment) != 0))
System\Windows\Forms\Design\MaskDesignerDialog.cs (2)
59
DesignerUtils
.ApplyListViewThemeStyles(_listViewCannedMasks);
373
ICollection descriptors =
DesignerUtils
.FilterGenericTypes(discoveryService.GetTypes(typeof(MaskDescriptor), false /* excludeGlobalTypes */));
System\Windows\Forms\Design\ParentControlDesigner.cs (14)
120
_defaultUseSnapLines =
DesignerUtils
.UseSnapLines(Component.Site);
154
object value =
DesignerUtils
.GetOptionValue(ServiceProvider, "ShowGrid");
230
object value =
DesignerUtils
.GetOptionValue(ServiceProvider, "GridSize");
376
object optionValue =
DesignerUtils
.GetOptionValue(ServiceProvider, "SnapToGrid");
541
Rectangle snappedBounds =
DesignerUtils
.GetBoundsFromToolboxSnapDragDropInfo(e, bounds, Control.IsMirrored);
876
container =
DesignerUtils
.CheckForNestedContainer(container); // ...necessary to support SplitterPanel components
1044
int glyphOffset = (int)(
DesignerUtils
.s_containerGrabHandleSize * .5);
1047
if (translatedBounds.Width < 2 *
DesignerUtils
.s_containerGrabHandleSize)
1053
ContainerSelectorGlyph containerSelectorGlyph = new(translatedBounds,
DesignerUtils
.s_containerGrabHandleSize, glyphOffset, behavior);
1306
defaultValue =
DesignerUtils
.GetOptionValue(ServiceProvider, optionName);
1861
Size minControlSize = new(
DesignerUtils
.MinDragSize.Width * 2,
DesignerUtils
.MinDragSize.Height * 2);
2006
DesignerUtils
.DrawFrame(_graphics, newRegion, _mouseDragFrame, Control.BackColor);
2309
IContainer container =
DesignerUtils
.CheckForNestedContainer(Component.Site.Container); // ...necessary to support SplitterPanel components
System\Windows\Forms\Design\StyleEditorForm.cs (7)
93
DesignerUtils
.ApplyListViewThemeStyles(_columnsAndRowsListView);
740
_absoluteNumericUpDown.Value =
DesignerUtils
.s_minimumStyleSize;
751
_percentNumericUpDown.Value =
DesignerUtils
.s_minimumStylePercent;
769
_absoluteNumericUpDown.Value =
DesignerUtils
.s_minimumStyleSize;
784
_percentNumericUpDown.Value =
DesignerUtils
.s_minimumStylePercent;
832
DesignerUtils
.s_minimumStyleSize.ToString(CultureInfo.InvariantCulture)
1068
DesignerUtils
.GetAssociatedComponents((IComponent)obj, host, componentList);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (17)
564
temp =
DesignerUtils
.CopyDragObjects(temp, Component.Site);
643
colProp?.SetValue(Table,
DesignerUtils
.s_defaultColumnCount);
646
rowProp?.SetValue(Table,
DesignerUtils
.s_defaultRowCount);
658
Table.ColumnStyles[0].Width =
DesignerUtils
.s_minimumStylePercent;
660
Table.ColumnStyles[1].Width =
DesignerUtils
.s_minimumStylePercent;
664
Table.RowStyles[0].Height =
DesignerUtils
.s_minimumStylePercent;
666
Table.RowStyles[1].Height =
DesignerUtils
.s_minimumStylePercent;
924
Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute,
DesignerUtils
.s_minimumStyleSize));
937
Table.RowStyles.Add(new RowStyle(SizeType.Absolute,
DesignerUtils
.s_minimumStyleSize));
1083
int halfSize =
DesignerUtils
.s_resizeGlyphSize / 2;
1109
Rectangle gBounds = new(startLoc - halfSize, checkBounds.Top,
DesignerUtils
.s_resizeGlyphSize, checkBounds.Height);
1136
Rectangle gBounds = new(checkBounds.Left, startLoc - halfSize, checkBounds.Width,
DesignerUtils
.s_resizeGlyphSize);
1682
Table.RowStyles.Insert(index, new RowStyle(SizeType.Absolute,
DesignerUtils
.s_minimumStyleSize));
1694
Table.ColumnStyles.Insert(index, new ColumnStyle(SizeType.Absolute,
DesignerUtils
.s_minimumStyleSize));
1902
DesignerUtils
.GetAssociatedComponents(control, host, al);
2001
Table.RowStyles[index].Height =
DesignerUtils
.s_minimumStylePercent;
2005
Table.ColumnStyles[index].Width =
DesignerUtils
.s_minimumStylePercent;
System\Windows\Forms\Design\TabOrder.cs (2)
52
_selSize =
DesignerUtils
.GetAdornmentDimensions(AdornmentType.GrabHandle).Width;
391
container =
DesignerUtils
.CheckForNestedContainer(container);
System\Windows\Forms\Design\TextBoxBaseDesigner.cs (1)
29
int baseline =
DesignerUtils
.GetTextBaseline(Control, Drawing.ContentAlignment.TopLeft);
System\Windows\Forms\Design\ToolStripDesigner.cs (4)
1370
int glyphOffset = (int)(
DesignerUtils
.s_containerGrabHandleSize * .5);
1372
if (translatedBounds.Width < 2 *
DesignerUtils
.s_containerGrabHandleSize)
1378
ContainerSelectorGlyph containerSelectorGlyph = new(translatedBounds,
DesignerUtils
.s_containerGrabHandleSize, glyphOffset, behavior);
1877
components =
DesignerUtils
.CopyDragObjects(dragComponents, Component.Site);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
709
components =
DesignerUtils
.CopyDragObjects(dragComponents, currentDropItem.Site);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
2736
components =
DesignerUtils
.CopyDragObjects(dragComponents, primaryItem.Site);
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (1)
67
DesignerUtils
.ApplyTreeViewThemeStyles(_treeView1);
System\Windows\Forms\Design\UpDownBaseDesigner.cs (1)
45
int baseline =
DesignerUtils
.GetTextBaseline(Control, Drawing.ContentAlignment.TopLeft);