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