263 writes to Width
System.Drawing (1)
commonui\System\Drawing\BufferedGraphicsContext.cs (1)
56maximumBuffer.Width = 75 * 3;
System.Web.DataVisualization (22)
Common\General\Legend.cs (18)
450 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 453 this._offset.Width = (int)Math.Ceiling(singleWCharacterSize.Width / 2f); 714 itemHalfSpacing.Width = (int)(_horizontalSpaceLeft / 2); 917 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 920 this._offset.Width = (int)Math.Ceiling(singleWCharacterSize.Width / 2f); 960 legenItemsMaxSize.Width -= 2 * (this._offset.Width + this.GetBorderSize()); 1034 optimalSize.Width = (legenItemsMaxSize.Width - horizSpaceLeft); 1035 optimalSize.Width = Math.Max(optimalSize.Width, titleSize.Width); 1036 optimalSize.Width += 2 * (this._offset.Width + this.GetBorderSize()); 1053 optimalSize.Width = maxSize.Width; 1061 optimalSize.Width = 0; 1742 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 1796 cellSize.Width = (int)Math.Max(cellSize.Width, legendColumn.MinimumWidth * singleWCharacterSize.Width / 100f); 1800 cellSize.Width = (int)Math.Min(cellSize.Width, legendColumn.MaximumWidth * singleWCharacterSize.Width / 100f); 3977 titleMaxSize.Width -= this.GetBorderSize() * 2 + this._offset.Width; 3988 titleSize.Width += this._offset.Width; 4015 headerSize.Width += this._offset.Width; 4414 size.Width += this._itemColumnSpacingRel;
Common\General\LegendColumns.cs (4)
1500 cellSize.Width = (int)(Math.Abs(this.SeriesSymbolSize.Width) * singleWCharacterSize.Width / 100f); 1512cellSize.Width = (int)imageSize.Width; 1518 cellSize.Width = (int)(Math.Abs(this.ImageSize.Width) * singleWCharacterSize.Width / 100f); 1538 cellSize.Width += (int)((this.Margins.Left + this.Margins.Right) * singleWCharacterSize.Width / 100f);
System.Windows.Forms (119)
misc\GDI\WindowsGraphics2.cs (1)
479proposedSize.Width = minWidth;
winforms\Managed\System\WinForms\Button.cs (1)
134requiredSize.Width += 14;
winforms\Managed\System\WinForms\ButtonBase.cs (1)
952proposedSize.Width = 0;
winforms\Managed\System\WinForms\CheckBox.cs (1)
380size.Width += flatSystemStylePaddingWidth;
winforms\Managed\System\WinForms\Control.cs (1)
11624size.Width = (int)Math.Round((float)size.Width * x);
winforms\Managed\System\WinForms\DataGridTextBoxColumn.cs (1)
335extents.Width += xMargin*2 + this.DataGridTableStyle.GridLineWidth;
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (2)
423preferredSize.Width += borderAndPaddingWidths + marginWidths + 2 * DATAGRIDVIEWBUTTONCELL_horizontalTextMargin; 427preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth);
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (8)
775checkBoxSize.Width -= 3; 779checkBoxSize.Width -= 2; 845preferredSize.Width += borderWidths.X; 853preferredSize.Width = Math.Max(preferredSize.Width, 1270checkBoxSize.Width -= 3; 1274checkBoxSize.Width -= 2; 1285checkBoxSize.Width -= 3; 1290checkBoxSize.Width -= 2;
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (9)
576preferredSize.Width += sortGlyphWidth + 580preferredSize.Width += sortGlyphSeparatorWidth; 583preferredSize.Width = Math.Max(preferredSize.Width, 1); 672preferredSize.Width += sortGlyphWidth + 676preferredSize.Width += sortGlyphSeparatorWidth; 680preferredSize.Width = Math.Max(preferredSize.Width, 1); 690preferredSize.Width += DATAGRIDVIEWCOLUMNHEADERCELL_horizontalTextMarginLeft + DATAGRIDVIEWCOLUMNHEADERCELL_horizontalTextMarginRight; 692preferredSize.Width += borderAndPaddingWidths; 703preferredSize.Width += rectThemeMargins.X + rectThemeMargins.Width;
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (3)
1457preferredSize.Width = 0; 1466preferredSize.Width += SystemInformation.HorizontalScrollBarThumbWidth + 1 + 2 * DATAGRIDVIEWCOMBOBOXCELL_margin + borderAndPaddingWidths; 1470preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + SystemInformation.HorizontalScrollBarThumbWidth + 1 + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth);
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (3)
573preferredSize.Width = 0; 583preferredSize.Width += borderAndPaddingWidths; 587preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth);
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (2)
739preferredSize.Width += DATAGRIDVIEWLINKCELL_horizontalTextMarginLeft + DATAGRIDVIEWLINKCELL_horizontalTextMarginRight + borderAndPaddingWidths; 743preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth);
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (2)
509preferredSize.Width += DATAGRIDVIEWTEXTBOXCELL_horizontalTextMarginLeft + DATAGRIDVIEWTEXTBOXCELL_horizontalTextMarginRight + borderAndPaddingWidths; 513preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth);
winforms\Managed\System\WinForms\DataGridViewUtilities.cs (5)
278preferredSize.Width += 2 * DATAGRIDVIEWROWHEADERCELL_contentMarginWidth + 289preferredSize.Width += DATAGRIDVIEWROWHEADERCELL_iconsWidth + 2 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth; 293preferredSize.Width += DATAGRIDVIEWROWHEADERCELL_iconsWidth + 2 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth; 300preferredSize.Width += borderAndPaddingWidths; 334sizeConstraint.Width = sizeCell.Width;
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (1)
395maxSize.Width = pageSize.Width;
winforms\Managed\System\WinForms\Form.cs (2)
3427correctClientSize.Width += SystemInformation.VerticalScrollBarWidth; 3449correct.Width += SystemInformation.VerticalScrollBarWidth;
winforms\Managed\System\WinForms\Label.cs (3)
1247bordersAndPadding.Width += 2; // taken from Everett.PreferredWidth 1269proposedSize.Width = 0; 1301requiredSize.Width = 0;
winforms\Managed\System\WinForms\Layout\DockAndAnchorLayout.cs (8)
42proposedConstraints.Width = bounds.Width; 355neededSize.Width = 0; 393newSize.Width = remainingSize.Width; 395newSize.Width = Math.Max(newSize.Width, remainingSize.Width); 523preferredSizeForAnchoring.Width -= containerPadding.Left; 836prefSize.Width = Math.Max(prefSize.Width, elementSpace.Right); 851prefSize.Width = Math.Max(prefSize.Width, elementSpace.Right + anchorDest.Width); 854prefSize.Width = Math.Max(prefSize.Width, anchorDest.Right);
winforms\Managed\System\WinForms\Layout\FlowLayout.cs (3)
135layoutSize.Width = Math.Max(layoutSize.Width, rowSize.Width); 190elementConstraints.Width = rowBounds.Width - rowSize.Width - elementProxy.Margin.Size.Width; 250rowSize.Width = location.X - rowBounds.X;
winforms\Managed\System\WinForms\Layout\LayoutUtils.cs (7)
58largestSize.Width = Math.Max(largestSize.Width, textSize.Width); 131if(size.Width == 0) size.Width = Int32.MaxValue; 315stretchedSize.Width = withinThis.Width; 345currentSize.Width = Math.Max(currentSize.Width, contentSize.Width); 348currentSize.Width += contentSize.Width; 396size.Width = size.Height; 506currentSize.Width -= contentSize.Width;
winforms\Managed\System\WinForms\Layout\TableLayout.cs (4)
196containerSize.Width = Math.Max(containerSize.Width, 1); 255containerSize.Width = Math.Max(containerSize.Width, 1); 268proposedConstraints.Width = Math.Max(proposedConstraints.Width, 1); 664preferredSize.Width = InflateColumns(containerInfo, proposedConstraints, measureOnly);
winforms\Managed\System\WinForms\MonthCalendar.cs (5)
1496this.dimensions.Width = (nCols < 1) ? 1 : nCols; 1499minSize.Width = (minSize.Width + INSERT_WIDTH_SIZE) * dimensions.Width - INSERT_WIDTH_SIZE; 1507minSize.Width = maxTodayWidth; 1513minSize.Width += scaledExtraPadding; 2059this.dimensions.Width = x;
winforms\Managed\System\WinForms\PropertyGridInternal\DocComment.cs (1)
144size.Width = Math.Max(0, size.Width - 2 * cBorder);
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (5)
1636size.Width = Math.Max(rect.Width + 1, size.Width); 1715size.Width = Math.Max(rect.Width + 1, size.Width); 2120size.Width = sizeWindow.Width; 2126size.Width -= sizeScroll.Width; 2128size.Width -= 2;
winforms\Managed\System\WinForms\RadioButton.cs (1)
323size.Width += flatSystemStylePaddingWidth;
winforms\Managed\System\WinForms\RichTextBox.cs (1)
566scrollBarPadding.Width += SystemInformation.VerticalScrollBarWidth;
winforms\Managed\System\WinForms\ScrollableControl.cs (2)
455scrollMargin.Width += Padding.Right; 477scrollMargin.Width += current.Size.Width;
winforms\Managed\System\WinForms\StatusBarPanel.cs (1)
558sz.Width += this.icon.Size.Width + 5;
winforms\Managed\System\WinForms\StatusStrip.cs (1)
309proposedSize.Width = Int32.MaxValue;
winforms\Managed\System\WinForms\TextBox.cs (1)
446scrollBarPadding.Width += SystemInformation.GetVerticalScrollBarWidthForDpi(deviceDpi);
winforms\Managed\System\WinForms\TextBoxBase.cs (1)
972bordersAndPadding.Width +=2;
winforms\Managed\System\WinForms\ThreadExceptionDialog.cs (1)
249if (textSize.Width < scaledMaxTextWidth) textSize.Width = scaledMaxTextWidth;
winforms\Managed\System\WinForms\ToolStrip.cs (6)
2451proposedSize.Width = Int32.MaxValue; 2495maxSize.Width += itemMargin.Horizontal + prefItemSize.Width; 2515maxSize.Width += overflowItemMargin.Horizontal + overflowItem.Bounds.Width; 2518maxSize.Width += 2; //add Padding of 2 Pixels to the right if not Overflow. 2524maxSize.Width += gripMargin.Horizontal + toolStrip.Grip.GripThickness; 2551maxSize.Width = Math.Max(maxSize.Width, itemMargin.Horizontal + preferredSize.Width);
winforms\Managed\System\WinForms\ToolStripButton.cs (1)
211prefSize.Width = Math.Max(prefSize.Width, standardButtonWidth);
winforms\Managed\System\WinForms\ToolStripComboBox.cs (1)
496preferredSize.Width = Math.Max(preferredSize.Width, 75);
winforms\Managed\System\WinForms\ToolStripDropDownButton.cs (1)
260preferredSize.Width += DropDownArrowRect.Width + scaledDropDownArrowPadding.Horizontal;
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (8)
354menuItemTextSize.Width += tabWidth + shortcutTextSize.Width; 359maxTextSize.Width = Math.Max(maxTextSize.Width, menuItemTextSize.Width); 368maxImageSize.Width = Math.Max(maxImageSize.Width, imageSize.Width); 373maxCheckSize.Width = Math.Max(checkedImageSize.Width, maxCheckSize.Width); 379maxNonMenuItemSize.Width = Math.Max(item.Bounds.Width, maxNonMenuItemSize.Width); 400maxTextSize.Width = Math.Max(maxTextSize.Width, maxNonMenuItemSize.Width); 482this.maxItemSize.Width = (arrowRectangle.Right + scaledArrowPadding.Right) - imageMarginBounds.Left; 834preferredSize.Width = dropDownMenu.MaxItemSize.Width - dropDownMenu.PaddingToTrim;
winforms\Managed\System\WinForms\ToolStripGrip.cs (1)
118preferredSize.Width = constrainingSize.Width;
winforms\Managed\System\WinForms\ToolStripOverflow.cs (1)
121constrainingSize.Width = 200;
winforms\Managed\System\WinForms\ToolStripOverflowButton.cs (1)
110preferredSize.Width = Math.Min(constrainingSize.Width, maxWidth);
winforms\Managed\System\WinForms\ToolStripPanelCell.cs (3)
197maxSize.Width += growBy; 241constrainingSize.Width = ToolStripPanelRow.Bounds.Width; 243preferredSize.Width = constrainingSize.Width;
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (1)
672preferredSize.Width = DisplayRectangle.Width;
winforms\Managed\System\WinForms\ToolStripScrollButton.cs (1)
154preferredSize.Width = (ParentInternal != null) ? ParentInternal.Width - 2 : preferredSize.Width; // Two for border
winforms\Managed\System\WinForms\ToolStripSeparator.cs (1)
425constrainingSize.Width = WINBAR_SEPARATORHEIGHT;
winforms\Managed\System\WinForms\ToolStripSplitButton.cs (1)
428preferredSize.Width += DropDownButtonWidth + SplitterWidth + Padding.Horizontal;
winforms\Managed\System\WinForms\ToolStripSplitStackLayout.cs (1)
488itemSize.Width = Math.Max(toolStripPreferredSize.Width - itemMargin.Horizontal -1, 0);
winforms\Managed\System\WinForms\WebBrowserBase.cs (3)
115this.webBrowserBaseChangingSize.Width = -1; // Invalid value. Use WebBrowserBase.Bounds instead, when this is the case. 256this.webBrowserBaseChangingSize.Width = width; 261this.webBrowserBaseChangingSize.Width = -1; // Invalid value. Use WebBrowserBase.Bounds instead, when this is the case.
System.Windows.Forms.DataVisualization (22)
Common\General\Legend.cs (18)
450 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 453 this._offset.Width = (int)Math.Ceiling(singleWCharacterSize.Width / 2f); 714 itemHalfSpacing.Width = (int)(_horizontalSpaceLeft / 2); 917 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 920 this._offset.Width = (int)Math.Ceiling(singleWCharacterSize.Width / 2f); 960 legenItemsMaxSize.Width -= 2 * (this._offset.Width + this.GetBorderSize()); 1034 optimalSize.Width = (legenItemsMaxSize.Width - horizSpaceLeft); 1035 optimalSize.Width = Math.Max(optimalSize.Width, titleSize.Width); 1036 optimalSize.Width += 2 * (this._offset.Width + this.GetBorderSize()); 1053 optimalSize.Width = maxSize.Width; 1061 optimalSize.Width = 0; 1742 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 1796 cellSize.Width = (int)Math.Max(cellSize.Width, legendColumn.MinimumWidth * singleWCharacterSize.Width / 100f); 1800 cellSize.Width = (int)Math.Min(cellSize.Width, legendColumn.MaximumWidth * singleWCharacterSize.Width / 100f); 3977 titleMaxSize.Width -= this.GetBorderSize() * 2 + this._offset.Width; 3988 titleSize.Width += this._offset.Width; 4015 headerSize.Width += this._offset.Width; 4414 size.Width += this._itemColumnSpacingRel;
Common\General\LegendColumns.cs (4)
1500 cellSize.Width = (int)(Math.Abs(this.SeriesSymbolSize.Width) * singleWCharacterSize.Width / 100f); 1512cellSize.Width = (int)imageSize.Width; 1518 cellSize.Width = (int)(Math.Abs(this.ImageSize.Width) * singleWCharacterSize.Width / 100f); 1538 cellSize.Width += (int)((this.Margins.Left + this.Margins.Right) * singleWCharacterSize.Width / 100f);
System.Workflow.Activities (18)
Designers\StateDesigner.cs (2)
1504newSize.Width = Math.Max(newSize.Width, bounds.Right); 1508newSize.Width = Math.Max(newSize.Width, this.MinimumSize.Width);
Designers\StateDesigner.Layouts.cs (13)
669minimumSize.Width = Math.Max(minimumSize.Width, layoutWidth); 678size.Width = Math.Max(containerSize.Width, minimumSize.Height); 773size.Width += layout.Size.Width + _breadCrumbSeparatorSize.Width; 969minimumSize.Width = designerTheme.BorderWidth * 2 + 10 + _textLayout.Size.Width + _imageLayout.Size.Width; 975size.Width = Math.Max(minimumSize.Width, containerSize.Width); 1103minimumSize.Width = Math.Max(minimumSize.Width, RealMinimumSize.Width); 1136size.Width = Math.Max(minWidth, size.Width); 1320size.Width = Math.Max(size.Width, minSize.Width); 1331size.Width = Math.Max(size.Width, activeDesignerSize.Width + ActiveDesignerPadding * 2); 1332size.Width = Math.Max(size.Width, _titleBarLayout.Size.Width); 1333size.Width = Math.Max(size.Width, _breadCrumbBarLayout.Size.Width); 1347size.Width = Math.Max(size.Width, activeDesigner.Size.Width + ActiveDesignerPadding * 2); 1348size.Width = Math.Max(size.Width, _designerLayout.Size.Width);
Designers\StateMachineWorkflowDesigner.cs (2)
81minimumSize.Width = Math.Max(minimumSize.Width, MinSize.Width); 85minimumSize.Width = Math.Max(minimumSize.Width, ParentView.ViewPortSize.Width - StateDesigner.Separator.Width * 2);
Designers\WhileDesigner.cs (1)
87containerSize.Width += 2 * compositeDesignerTheme.ConnectorSize.Width;
System.Workflow.ComponentModel (81)
AuthoringOM\Design\ActivityDesigner.cs (9)
237value.Width = Math.Max(value.Width, MinimumSize.Width); 1713requestedLineSize.Width /= Text.Length; 1714requestedLineSize.Width += ((requestedLineSize.Width % Text.Length) > 0) ? 1 : 0; 1715requestedLineSize.Width *= Math.Min(Text.Length, ActivityDesigner.MaximumCharsPerLine - 1); 1717this.textSize.Width = MinimumSize.Width - 2 * e.AmbientTheme.Margin.Width; 1719this.textSize.Width -= e.DesignerTheme.ImageSize.Width + e.AmbientTheme.Margin.Width; 1720this.textSize.Width = Math.Min(this.textSize.Width, actualTextSize.Width); 1721this.textSize.Width = Math.Max(this.textSize.Width, requestedLineSize.Width); 1736size.Width = 2 * e.AmbientTheme.Margin.Width + ((Image != null) ? (e.DesignerTheme.ImageSize.Width + e.AmbientTheme.Margin.Width) : 0) + this.textSize.Width;
AuthoringOM\Design\ActivityPreviewDesigner.cs (8)
613containerSize.Width = Math.Max(containerSize.Width, this.previewStrip.Size.Width); 622containerSize.Width = Math.Max(containerSize.Width, this.previewWindow.Size.Width); 623containerSize.Width += 2 * e.AmbientTheme.Margin.Width; 631containerSize.Width = Math.Max(containerSize.Width, size.Width); 632containerSize.Width += 3 * e.AmbientTheme.Margin.Width; 633containerSize.Width += 2 * e.AmbientTheme.SelectionSize.Width; 637containerSize.Width = Math.Max(containerSize.Width, MinimumSize.Width); 988configErrorSize.Width = configErrorSize.Width * 3 / 4;
AuthoringOM\Design\CompositeActivityDesigner.cs (5)
339requestedLineSize.Width /= Text.Length; 340requestedLineSize.Width += ((requestedLineSize.Width % Text.Length) > 0) ? 1 : 0; 341requestedLineSize.Width *= Math.Min(Text.Length, CompositeActivityDesigner.MaximumCharsPerLine - 1); 344textSize.Width = Math.Min(maxAvailableWidth, this.actualTextSize.Width); 345textSize.Width = Math.Max(1, Math.Max(textSize.Width, requestedLineSize.Width));
AuthoringOM\Design\Connector.cs (1)
186defaultSize.Width += defaultSize.Width / 2;
AuthoringOM\Design\DesignerHelpers.cs (3)
442offset.Width += (shadowDepth + 1); 444offset.Width -= (shadowDepth + 1); 1189snapSize.Width /= 2; snapSize.Height /= 2;
AuthoringOM\Design\DesignerWidgets.cs (9)
754reqdSize.Width = (this.items.Count * this.itemSize.Width) + ((this.items.Count + 1) * this.margin.Width); 759reqdSize.Width = this.itemSize.Width + 2 * this.margin.Width; 1313fittingOffset.Width += this.workingRectangle.Left - bounds.Left; 1315fittingOffset.Width -= bounds.Right - this.workingRectangle.Right; 1342maxTextSize.Width = Math.Max(Convert.ToInt32(Math.Ceiling(size.Width)), maxTextSize.Width); 1346maxTextSize.Width = Math.Min(maxTextSize.Width, this.maximumTextWidth); 2847scrollButtonSize.Width = Math.Min(scrollButtonSize.Width, scrollButtonSize.Height); 3387this.previewDescTextSize.Width = Math.Min(this.canvasBounds.Size.Width - margin.Width - this.previewModeButtonRectangle.Size.Width, this.previewDescTextSize.Width); 3394totalSize.Width = this.canvasBounds.Width + 2 * margin.Width;
AuthoringOM\Design\FreeFormDesigner.cs (6)
176margin.Width += gridSize.Width / 2; 245minimumSize.Width *= 4; 253minimumSize.Width = Math.Max(minimumSize.Width, workflowView.ViewPortSize.Width - 2 * WorkflowRootLayout.Separator.Width); 262minimumSize.Width = Math.Max(minimumSize.Width, childRectangle.Width); 823size.Width += Math.Max(bounds.Left - childRectangle.Left, 0); 824size.Width += Math.Max(childRectangle.Right - bounds.Right, 0);
AuthoringOM\Design\MessageFilters\AutoScrollExpandMessageFilter.cs (1)
143indicatorSize.Width += 2 * ambientTheme.Margin.Width;
AuthoringOM\Design\MessageFilters\DynamicActionMessageFilter.cs (1)
570size.Width = (2 * borderSize.Width) + (buttonCount * this.buttonSize.Width) + ((buttonCount + 1) * this.margin.Width);
AuthoringOM\Design\ParallelActivityDesigner.cs (6)
252containerSize.Width += e.AmbientTheme.SelectionSize.Width; 253containerSize.Width += compositeDesignerTheme.ConnectorSize.Width; 254containerSize.Width += childSize.Width; 255containerSize.Width += e.AmbientTheme.SelectionSize.Width; 258containerSize.Width += (ContainedDesigners.Count > 0) ? compositeDesignerTheme.ConnectorSize.Width : 0; 268size.Width = Math.Max(size.Width, containerSize.Width);
AuthoringOM\Design\SequentialActivityDesigner.cs (5)
485containerSize.Width = Math.Max(containerSize.Width, childSize.Width); 493containerSize.Width = Math.Max(helpTextRectangle.Width, containerSize.Width); 498containerSize.Width = Math.Max(containerSize.Width, compositeDesignerTheme.Size.Width); 499containerSize.Width += 3 * e.AmbientTheme.Margin.Width; 500containerSize.Width += 2 * e.AmbientTheme.SelectionSize.Width;
AuthoringOM\Design\SequentialWorkflowRootDesigner.cs (2)
94minimumSize.Width = Math.Max(minimumSize.Width, SequentialWorkflowRootDesigner.MinSize.Width); 98minimumSize.Width = Math.Max(minimumSize.Width, ParentView.ViewPortSize.Width - 2 * WorkflowRootLayout.Separator.Width);
AuthoringOM\Design\StructuredCompositeActivityDesigner.cs (4)
167minimumSize.Width = Math.Max(minimumSize.Width, 160); 564containerSize.Width = Math.Max(containerSize.Width, activeDesigner.Size.Width); 567containerSize.Width += 2 * e.AmbientTheme.SelectionSize.Width; 568containerSize.Width += 3 * e.AmbientTheme.Margin.Width;
AuthoringOM\Design\WorkflowLayouts.cs (14)
220clientSize.Width = (int)(clientSize.Width / ((float)this.parentView.Zoom / 100.0f)); 321totalSize.Width = Math.Max(totalSize.Width, layoutExtent.Width); 372maxSize.Width = (this.rowColumns.Width * this.pageSize.Width) + ((this.rowColumns.Width + 1) * (PageSeparator.Width)); 425deltaSize.Width -= deltaLocation.X; 460deltaSize.Width -= deltaLocation.X; 729rootDesignerSize.Width += 3 * selectionSize.Width; 741printableArea.Width = Math.Max(printableArea.Width, 1); 756this.pageSize.Width = Convert.ToInt32(Math.Ceiling(((float)this.pageSize.Width) / this.scaling)); 782viewablePageSize.Width = Math.Max(viewablePageSize.Width, 1); 787this.rowColumns.Width = rootDesignerSize.Width / viewablePageSize.Width; 788this.rowColumns.Width += ((rootDesignerSize.Width % viewablePageSize.Width) > 1) ? 1 : 0; 789this.rowColumns.Width = Math.Max(1, this.rowColumns.Width); 829size.Width = Math.Max(paperSize.Height, 1); 834size.Width = Math.Max(paperSize.Width, 1);
AuthoringOM\Design\WorkflowPrinting.cs (3)
154viewPortSize.Width = Convert.ToInt32(Math.Ceiling((float)printableArea.Width / this.scaling)); 317rootDesignerSize.Width += 3 * selectionSize.Width; 327printableArea.Width = Math.Max(printableArea.Width, 1);
AuthoringOM\Design\WorkflowView.cs (4)
449viewPortSize.Width = Math.Max(0, viewPortSize.Width - VScrollBar.Width); 1745scrollDelta.Width = (rect.Left + rect.Width / 2) - (clientRectangle.Left + clientRectangle.Width / 2); 1747scrollDelta.Width = (rect.Left - clientRectangle.Left); 1749scrollDelta.Width = (rect.Right - clientRectangle.Right);
1427 references to Width
System.Drawing (57)
commonui\System\Drawing\Advanced\PointF.cs (2)
169return new PointF(pt.X + sz.Width, pt.Y + sz.Height); 178return new PointF(pt.X - sz.Width, pt.Y - sz.Height);
commonui\System\Drawing\Bitmap.cs (4)
462this(original, (object) newSize != null ? newSize.Width : 0, (object) newSize != null ? newSize.Height : 0) { 584result = new Bitmap(size.Width, size.Height, PixelFormat.Format32bppArgb); 588Rectangle rectangle = new Rectangle(0,0, size.Width, size.Height); 5950,0, size.Width, size.Height,
commonui\System\Drawing\BufferedGraphics.cs (1)
161SafeNativeMethods.BitBlt(refTargetDC, targetLoc.X, targetLoc.Y, virtualSize.Width, virtualSize.Height,
commonui\System\Drawing\BufferedGraphicsContext.cs (6)
94if (value.Width <= 0 || value.Height <= 0) { 101if (value.Width * value.Height < maximumBuffer.Width * maximumBuffer.Height) { 383if (width > bufferSize.Width || height > bufferSize.Height) 386int optWidth = Math.Max(width, bufferSize.Width); 674return (targetBounds.Width * targetBounds.Height) > (MaximumBuffer.Width * MaximumBuffer.Height);
commonui\System\Drawing\Graphics.cs (1)
917int destWidth = blockRegionSize.Width;
commonui\System\Drawing\Icon.cs (19)
92public Icon(string fileName, Size size) : this(fileName, size.Width, size.Height) { 121public Icon(Icon original, Size size) : this(original, size.Width, size.Height) { 144handle = SafeNativeMethods.CopyImage(new HandleRef(original, original.Handle), SafeNativeMethods.IMAGE_ICON, iconSize.Width, iconSize.Height, 0); 178public Icon(Stream stream, Size size) : this(stream, size.Width, size.Height) { 215Initialize(iconSize.Width, iconSize.Height); 355get { return Size.Width;} 365return new Icon(this, Size.Width, Size.Height); 438imageWidth = cursorSize.Width; 449targetWidth = cursorSize.Width; 457drawWidth = cursorSize.Width * targetWidth / imageWidth; 463drawWidth = cursorSize.Width; 493Draw(graphics, new Rectangle(x, y, size.Width, size.Height)); 966bitmap = new Bitmap(Size.Width, Size.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb); 971System.Drawing.Imaging.BitmapData bmpdata = bitmap.LockBits(new Rectangle(0, 0, Size.Width, Size.Height), 982int lineLength = Size.Width * 4; 983int width = Size.Width; 1065bitmap = new Bitmap(size.Width, size.Height); // initialized to transparent 1074graphics.DrawImage(tmpBitmap, new Rectangle(0, 0, size.Width, size.Height)); 1081Draw(graphics, new Rectangle(0, 0, size.Width, size.Height));
commonui\System\Drawing\Point.cs (3)
61this.x = sz.Width; 191return new Point(pt.X + sz.Width, pt.Y + sz.Height); 200return new Point(pt.X - sz.Width, pt.Y - sz.Height);
commonui\System\Drawing\Printing\PreviewPrintController.cs (1)
122Metafile metafile = new Metafile(dc.Hdc, new Rectangle(0,0, metafileSize.Width, metafileSize.Height), MetafileFrameUnit.GdiCompatible, EmfType.EmfPlusOnly);
commonui\System\Drawing\Printing\PrinterUnitConvert.cs (1)
70Convert(value.Width, fromUnit, toUnit),
commonui\System\Drawing\Rectangle.cs (3)
73this.width = size.Width; 118this.Width = value.Width; 405Inflate(size.Width, size.Height);
commonui\System\Drawing\Size.cs (8)
78return new SizeF(p.Width, p.Height); 108return sz1.Width == sz2.Width && sz1.Height == sz2.Height; 127return new Point(size.Width, size.Height); 184return new Size(sz1.Width + sz2.Width, sz1.Height + sz2.Height); 202return new Size(sz1.Width - sz2.Width, sz1.Height - sz2.Height);
commonui\System\Drawing\SizeConverter.cs (2)
127args[nArg++] = intConverter.ConvertToString(context, culture, size.Width); 137return new InstanceDescriptor(ctor, new object[] {size.Width, size.Height});
commonui\System\Drawing\ToolboxBitmapAttribute.cs (2)
219img = new Bitmap((Bitmap)smallImage, largeSize.Width, largeSize.Height); 369img = new Bitmap(b, largeSize.Width , largeSize.Height);
misc\DpiHelper.cs (4)
457deviceImage = new Bitmap(deviceImageSize.Width, deviceImageSize.Height, logicalImage.PixelFormat); 463RectangleF sourceRect = new RectangleF(0, 0, logicalImage.Size.Width, logicalImage.Size.Height); 464RectangleF destRect = new RectangleF(0, 0, deviceImageSize.Width, deviceImageSize.Height); 558return new Size(LogicalToDeviceUnits(logicalSize.Width, deviceDpi),
System.Web.DataVisualization (64)
Common\General\Legend.cs (47)
450 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 453 this._offset.Width = (int)Math.Ceiling(singleWCharacterSize.Width / 2f); 454 this._offset.Height = (int)Math.Ceiling(singleWCharacterSize.Width / 3f); 457 this._itemColumnSpacingRel = (int)(singleWCharacterSize.Width * (this._itemColumnSpacing / 100f)); 511 legendPosition.Location.X + this.GetBorderSize() + this._offset.Width, 513 legendPosition.Width - (this.GetBorderSize() + this._offset.Width) * 2, 529 legendPosition.X + this._offset.Width + this.GetBorderSize(), 531 legendPosition.Width - 2 * (this._offset.Width + this.GetBorderSize()), 827 cellPosition.X += itemHalfSpacing.Width; 843 cellPosition.X += this.GetSeparatorSize(this.ItemColumnSeparator).Width; 917 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 920 this._offset.Width = (int)Math.Ceiling(singleWCharacterSize.Width / 2f); 921 this._offset.Height = (int)Math.Ceiling(singleWCharacterSize.Width / 3f); 922 this._itemColumnSpacingRel = (int)(singleWCharacterSize.Width * (this._itemColumnSpacing / 100f)); 960 legenItemsMaxSize.Width -= 2 * (this._offset.Width + this.GetBorderSize()); 1034 optimalSize.Width = (legenItemsMaxSize.Width - horizSpaceLeft); 1035 optimalSize.Width = Math.Max(optimalSize.Width, titleSize.Width); 1036 optimalSize.Width += 2 * (this._offset.Width + this.GetBorderSize()); 1051 if(optimalSize.Width > maxSize.Width) 1053 optimalSize.Width = maxSize.Width; 1059 if(optimalSize.Width < 0) 1332 averageColumnWidth = (int)Math.Round((double)(legendSize.Width - horSpaceLeft) / columnNumber) / 2; 1742 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 1796 cellSize.Width = (int)Math.Max(cellSize.Width, legendColumn.MinimumWidth * singleWCharacterSize.Width / 100f); 1800 cellSize.Width = (int)Math.Min(cellSize.Width, legendColumn.MaximumWidth * singleWCharacterSize.Width / 100f); 1805 cellWidths[currentColumn, currentRow, cellIndex] = cellSize.Width; 1893 if(headerTextSize.Width > subColumnSizes[currentColumn, currentSubColumn]) 1896 subColumnSizes[currentColumn, currentSubColumn] = headerTextSize.Width; 1902 (int)Math.Max(subColumnSizes[currentColumn, currentSubColumn], legendColumn.MinimumWidth * singleWCharacterSize.Width / 100f); 1907 (int)Math.Min(subColumnSizes[currentColumn, currentSubColumn], legendColumn.MaximumWidth * singleWCharacterSize.Width / 100f); 2006 totalTableColumnSpacingWidth += this.GetSeparatorSize(this.ItemColumnSeparator).Width; 2025 horizontalSpaceLeft = legendItemsAreaSize.Width - totalWidth - totalTableColumnSpacingWidth; 2495 separatorRect.X += this.GetBorderSize() + this._offset.Width; 2496 separatorRect.Width = this.GetSeparatorSize(this.ItemColumnSeparator).Width; 3977 titleMaxSize.Width -= this.GetBorderSize() * 2 + this._offset.Width; 3988 titleSize.Width += this._offset.Width; 4015 headerSize.Width += this._offset.Width; 4226 prevRightLocation += this.GetSeparatorSize(this.ItemColumnSeparator).Width; 4317 rect.X += this._offset.Width; 4319 rect.Width -= this.GetBorderSize() * 2 + this._offset.Width;
Common\General\LegendColumns.cs (16)
403 if(value.Width < 0 || value.Height < 0) 1194 if(value.Width < 0 || value.Height < 0) 1220 if(value.Width < 0 || value.Height < 0) 1447 this.cellPosition.X += (int)(this.Margins.Left * singleWCharacterSize.Width / 100f); 1449 this.cellPosition.Width -= (int)(this.Margins.Left * singleWCharacterSize.Width / 100f) 1450 + (int)(this.Margins.Right * singleWCharacterSize.Width / 100f); 1500 cellSize.Width = (int)(Math.Abs(this.SeriesSymbolSize.Width) * singleWCharacterSize.Width / 100f); 1518 cellSize.Width = (int)(Math.Abs(this.ImageSize.Width) * singleWCharacterSize.Width / 100f); 1538 cellSize.Width += (int)((this.Margins.Left + this.Margins.Right) * singleWCharacterSize.Width / 100f); 2109 if(this.ImageSize.Width > 0) 2111 int newWidth = (int)(this.ImageSize.Width * singleWCharacterSize.Width / 100f); 2224 if(this.SeriesSymbolSize.Width >= 0) 2226 int newWidth = (int)(this.SeriesSymbolSize.Width * singleWCharacterSize.Width / 100f);
Common\Utilities\XmlSerializer.cs (1)
2724 writer.Write(((Size)obj).Width);
System.Web.Mobile (6)
UI\MobileControls\Design\FormDesigner.cs (1)
162GetDefaultSize().Width
UI\MobileControls\Design\MobileContainerDesigner.cs (1)
638SetBehaviorStyle("width", GetDefaultSize().Width);
UI\MobileControls\Design\PanelDesigner.cs (2)
135GetDefaultSize().Width 171SetBehaviorStyle("width", ValidContainment? "100%" : GetDefaultSize().Width.ToString(CultureInfo.InvariantCulture) + "px");
UI\MobileControls\Design\Util\GenericUI.cs (1)
95header.Width = dialog.ClientSize.Width - 10;
UI\MobileControls\Design\Util\GroupLabel.cs (1)
47etchLeft += 6 + sz.Width;
System.Windows.Forms (648)
misc\DpiHelper.cs (4)
457deviceImage = new Bitmap(deviceImageSize.Width, deviceImageSize.Height, logicalImage.PixelFormat); 463RectangleF sourceRect = new RectangleF(0, 0, logicalImage.Size.Width, logicalImage.Size.Height); 464RectangleF destRect = new RectangleF(0, 0, deviceImageSize.Width, deviceImageSize.Height); 558return new Size(LogicalToDeviceUnits(logicalSize.Width, deviceDpi),
misc\GDI\DeviceContext2.cs (1)
462IntUnsafeNativeMethods.SetViewportExtEx( new HandleRef( this, this.Hdc ), newExtent.Width, newExtent.Height, oldExtent );
misc\GDI\WindowsGraphics2.cs (5)
250if( bounds.Width == MaxSize.Width ) 478if( proposedSize.Width <= minWidth ) { 485IntNativeMethods.RECT rect = IntNativeMethods.RECT.FromXYWH(0, 0, proposedSize.Width, proposedSize.Height); 504if (proposedSize.Width == MaxSize.Width)
winforms\Managed\System\WinForms\AxHost.cs (8)
1568width = adjustedSize.Width; 1591width = p.Width; 1775b.Width = p.Width; 3616if (setExtent.Width < ocxExtent.Width || setExtent.Height < ocxExtent.Height) 3617Bounds = new Rectangle(location.X, location.Y, ocxExtent.Width, ocxExtent.Height); 3619Size newSize = SetExtent(setExtent.Width, setExtent.Height); 3621Bounds = new Rectangle(location.X, location.Y, newSize.Width, newSize.Height);
winforms\Managed\System\WinForms\Button.cs (1)
122if (systemSize.Width == InvalidDimensionValue) {
winforms\Managed\System\WinForms\ButtonBase.cs (2)
951if( proposedSize.Width == 1 ) { 1133ShowToolTip = (this.ClientRectangle.Width < preferredSize.Width || this.ClientRectangle.Height < preferredSize.Height);
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (9)
975xCompose(hComposition, checkSize.Width, imageSize.Width, textSize.Width), 1002xDecompose(hComposition, checkSize.Width, imageSize.Width, proposedSize.Width), 1322size = new Size(size.Width + 1, size.Height + 1); 1384if (textImageRelation == TextImageRelation.ImageBeforeText && layout.imageBounds.Size.Width != 0) { 1447textSize = Size.Ceiling(g.MeasureString(text, font, new SizeF(proposedSize.Width, proposedSize.Height), gdipStringFormat));
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxStandardAdapter.cs (1)
114layout.checkSize = CheckBoxRenderer.GetGlyphSize(g, CheckBoxRenderer.ConvertFromButtonState(GetState(), true, Control.MouseIsOver), Control.HandleInternal).Width;
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonStandardAdapter.cs (1)
75layout.checkSize = RadioButtonRenderer.GetGlyphSize(g, RadioButtonRenderer.ConvertFromButtonState(GetState(), b.MouseIsOver), b.HandleInternal).Width;
winforms\Managed\System\WinForms\CheckedListBox.cs (1)
682idealCheckSize = (int)(CheckBoxRenderer.GetGlyphSize(e.Graphics, cbState, HandleInternal)).Width;
winforms\Managed\System\WinForms\ComboBox.cs (2)
823base.MaximumSize = new Size(value.Width, 0); 830base.MinimumSize = new Size(value.Width, 0);
winforms\Managed\System\WinForms\Control.cs (14)
532width = defaultSize.Width; 1617SetClientSizeCore(value.Width, value.Height); 3896SetBounds(x, y, value.Width, value.Height, BoundsSpecified.Size); 6448return ApplyBoundsConstraints(0,0,proposedSize.Width,proposedSize.Height).Size; 11562SetBoundsCore(rawScaledBounds.X, rawScaledBounds.Y, scaledSize.Width, scaledSize.Height, BoundsSpecified.All); 11624size.Width = (int)Math.Round((float)size.Width * x); 11949return SizeFromClientSize(clientSize.Width, clientSize.Height); 12460return width != s.Width || height != s.Height; 16959Point pt = PixelToHiMetric(size.Width, size.Height); 18263Size adjusted = new Size(size.Width, size.Height); 18264bounds.Width = adjusted.Width; 19242if (size.Width < 0 || size.Height < 0) { 19247destRect = new NativeMethods.RECT(0, 0, size.Width, size.Height); 19252hBitmap = new HandleRef(this, SafeNativeMethods.CreateBitmap(size.Width, size.Height, planes, bitsPixel, IntPtr.Zero));
winforms\Managed\System\WinForms\ControlPaint.cs (20)
92if (szCtl.Width > result.Width) { 93result.X = (szCtl.Width - result.Width) / 2; 102float xRatio = (float)bounds.Width / (float)imageSize.Width; 120result.Width = (int) ((imageSize.Width * yRatio) +.5); 224graphics.FillRectangle(brush, 0, 0, size.Width, size.Height); 226graphics.DrawImage(bitmap, 0, 0, size.Width, size.Height); 287IntPtr mask = SafeNativeMethods.CreateBitmap(size.Width, size.Height, 1, /* 1bpp */ 1, bits); 323SafeNativeMethods.BitBlt(new HandleRef(null, target), 0, 0, size.Width, size.Height, new HandleRef(null, source), 354int destWidth = blockRegionSize.Width; 965rc.left -= sz.Width; 966rc.right += sz.Width; 1452if (pixelsBetweenDots.Width <= 0 || pixelsBetweenDots.Height <= 0) { 1459if (gridBrush == null || gridSize.Width != pixelsBetweenDots.Width 1473int width = ((idealSize / pixelsBetweenDots.Width) + 1) * pixelsBetweenDots.Width; 1479for (int x = 0; x < width; x += pixelsBetweenDots.Width) 1599new Rectangle(0, 0, imageSize.Width, imageSize.Height), 16000, 0, imageSize.Width, imageSize.Height, 16100, 0, imageSize.Width, imageSize.Height,
winforms\Managed\System\WinForms\Cursor.cs (9)
365return SafeNativeMethods.CopyImage(new HandleRef(this, Handle), NativeMethods.IMAGE_CURSOR, sz.Width, sz.Height, 0); 442imageWidth = cursorSize.Width; 453targetWidth = cursorSize.Width; 466&& imageWidth == cursorSize.Width && imageHeight == cursorSize.Height) { 471drawWidth = cursorSize.Width * targetWidth / imageWidth; 481&& cursorSize.Width <= targetWidth && cursorSize.Height <= targetHeight 482&& cursorSize.Width == imageWidth && cursorSize.Height == imageHeight) { 487drawWidth = cursorSize.Width; 641picSize.Width, picSize.Height, 0);
winforms\Managed\System\WinForms\DataGrid.cs (2)
587return SystemInformation.Border3DSize.Width; 4775int width = column.GetPreferredSize(g, value).Width;
winforms\Managed\System\WinForms\DataGridCaption.cs (5)
434return new Rectangle( bounds.Right - xOffset * 4 - downButtonWidth - backButtonSize.Width, 436backButtonSize.Width, 444width = detailsBmp.Size.Width; 455int downButtonWidth = downButtonSize.Width; 482Math.Min(textWidthLeft, 2 * textPadding + textSize.Width),
winforms\Managed\System\WinForms\DataGridParentRows.cs (1)
626int size = columns[colNum].GetPreferredSize(g, value).Width;
winforms\Managed\System\WinForms\DataGridRow.cs (2)
561Rectangle bmpRect = new Rectangle(alignToRight ? visualBounds.Right - xOffset - bmpSize.Width : visualBounds.X + xOffset, 563bmpSize.Width,
winforms\Managed\System\WinForms\DataGridToolTip.cs (1)
49UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\DataGridView.cs (1)
1457return Application.RenderWithVisualStyles ? 1 : SystemInformation.Border3DSize.Width;
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (6)
380preferredSize = new Size(DataGridViewCell.MeasureTextSize(graphics, formattedString, cellStyle.Font, flags).Width, 388constraintSize.Width - borderAndPaddingWidths - marginWidths - 2 * DATAGRIDVIEWBUTTONCELL_horizontalTextMargin > 0) 394constraintSize.Width - borderAndPaddingWidths - marginWidths - 2 * DATAGRIDVIEWBUTTONCELL_horizontalTextMargin, 427preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth); 796valBounds.Inflate(-SystemInformation.Border3DSize.Width, -SystemInformation.Border3DSize.Height); 938valBounds.Width > 2 * SystemInformation.Border3DSize.Width + 1 &&
winforms\Managed\System\WinForms\DataGridViewCell.cs (16)
1974if (constraintSize.Width < 0 || constraintSize.Height < 0) 1978if (constraintSize.Width == 0) 2616widthTruncated = size.Width > maxWidth; 2633return GetPreferredSize(g, dataGridViewCellStyle, rowIndex, new Size(0, height)).Width; 2868widthTruncated = (requiredSize.Width > maxWidth); 2904if ((float)(textOneLineSize.Width / textOneLineSize.Height) <= maxRatio) 2910float maxWidth = (float) (textOneLineSize.Width * textOneLineSize.Width) / (float) textOneLineSize.Height / maxRatio * 1.1F; 2916if ((float)(textSize.Width / textSize.Height) <= maxRatio || textSize.Width > (int)maxWidth) 2920maxWidth = (float)textSize.Width * 0.9F; 2967return oneLineSize.Width; 2972int lastFittingWidth = oneLineSize.Width; 2979if (textSize.Height > maxHeight || textSize.Width > (int)maxWidth) 2986maxWidth = (float)textSize.Width * 0.9F; 4700int requiredHeight = DataGridViewCell.MeasureTextHeight(graphics, text, font, maxBounds.Width, flags, out widthTruncated);
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (26)
787preferredSize = new Size(checkBoxSize.Width + borderAndPaddingWidths + 2 * DATAGRIDVIEWCHECKBOXCELL_margin, 0); 797preferredSize = new Size(checkBoxSize.Width + borderAndPaddingWidths + 2 * DATAGRIDVIEWCHECKBOXCELL_margin, 809checkBoxSize = CheckBoxRenderer.GetGlyphSize(graphics, CheckBoxState.UncheckedNormal).Width - 3; 812checkBoxSize = CheckBoxRenderer.GetGlyphSize(graphics, CheckBoxState.UncheckedNormal).Width - 2; 815checkBoxSize = SystemInformation.Border3DSize.Width * 2 + 9 + 2 * DATAGRIDVIEWCHECKBOXCELL_margin; 853preferredSize.Width = Math.Max(preferredSize.Width, 1294checkBoxSize = new Size(SystemInformation.Border3DSize.Width * 2 + 9, SystemInformation.Border3DSize.Width * 2 + 9); 1299if (valBounds.Width >= checkBoxSize.Width && valBounds.Height >= checkBoxSize.Height && (paint || computeContentBounds)) 1305checkBoxX = valBounds.Right - checkBoxSize.Width; 1309checkBoxX = valBounds.Left + (valBounds.Width - checkBoxSize.Width) / 2; 1334new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height), 1338resultBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1348ControlPaint.DrawMixedCheckBox(g, checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height, bs); 1352ControlPaint.DrawCheckBox(g, checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height, bs); 1356resultBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1363Rectangle checkBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1419Rectangle fullSize = new Rectangle(checkBoxX-1, checkBoxY-1, checkBoxSize.Width+3, checkBoxSize.Height+3); 1463Rectangle checkBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width - 1, checkBoxSize.Height - 1); 1473checkBoxSize.Width, 1501CheckBoxBaseAdapter.DrawCheckOnly(checkBoxSize.Width, 1521checkBoxSize.Width, 1548CheckBoxBaseAdapter.DrawCheckOnly(checkBoxSize.Width, 1565checkBoxSize.Width, 1593CheckBoxBaseAdapter.DrawCheckOnly(checkBoxSize.Width, 1621Debug.Assert(valBounds.Width < checkBoxSize.Width || valBounds.Height < checkBoxSize.Height, "the bounds are empty");
winforms\Managed\System\WinForms\DataGridViewColumn.cs (4)
1253preferredCellThickness = this.HeaderCell.GetPreferredSize(-1).Width; 1273preferredCellThickness = dataGridViewRow.Cells[this.Index].GetPreferredSize(rowIndex).Width; 1296preferredCellThickness = dataGridViewRow.Cells[this.Index].GetPreferredSize(rowIndex).Width; 1319preferredCellThickness = dataGridViewRow.Cells[this.Index].GetPreferredSize(rowIndex).Width;
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (7)
568flags).Width, 583preferredSize.Width = Math.Max(preferredSize.Width, 1); 588int allowedWidth = constraintSize.Width - borderAndPaddingWidths; 609if (glyphSize.Width > 0 && 614glyphSize.Width > 0) 624glyphSize.Width, 680preferredSize.Width = Math.Max(preferredSize.Width, 1);
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (7)
755Size adjustedSize = new Size(size.Width - borderAndPaddingWidths.X - borderAndPaddingWidths.Width, 764int dropWidth = Math.Min(SystemInformation.HorizontalScrollBarThumbWidth, adjustedSize.Width - 2 * DATAGRIDVIEWCOMBOBOXCELL_margin - 1); 780if (x >= size.Width - borderAndPaddingWidths.Width - dropWidth - 1 && 781x <= size.Width - borderAndPaddingWidths.Width - 1) 831if (preferredSize.Width > maxPreferredWidth) 833maxPreferredWidth = preferredSize.Width; 1470preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + SystemInformation.HorizontalScrollBarThumbWidth + 1 + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth);
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (3)
494int imgWidthAllowed = constraintSize.Width - borderAndPaddingWidths; 506int icoWidthAllowed = constraintSize.Width - borderAndPaddingWidths; 587preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth);
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (3)
698Math.Max(1, constraintSize.Width - borderAndPaddingWidths - DATAGRIDVIEWLINKCELL_horizontalTextMarginLeft - DATAGRIDVIEWLINKCELL_horizontalTextMarginRight), 719preferredSize = new Size(DataGridViewCell.MeasureTextSize(graphics, formattedString, cellStyle.Font, flags).Width, 743preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (18)
2022preferredWidth = this.TopLeftHeaderCell.GetPreferredSize(-1).Width; 2038preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2058preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndex).Width); 2077preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndex).Width); 2096preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2195preferredWidth = this.TopLeftHeaderCell.GetPreferredSize(-1).Width; 2211preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2231preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2250preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2269preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 5842if (Math.Abs(dgvcme.X - this.lastMouseClickInfo.x) <= hotDoubleClickZone.Width / 2 && 9065int bordersAndPaddingWidth = 2*(this.BorderWidth + this.Padding.Size.Width); 9080int preferredWidth = Math.Min(minimumWidth + this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible), proposedConstraints.Width); 13041if (Math.Abs(this.ptMouseDownGridCoord.X - ptGridCoord.X) >= DataGridView.DragSize.Width || 19364Invalidate(new Rectangle(new Point(ClientSize.Width - (pt.X - rect.Right) - step, ColumnHeadersHeight), 19372new Size(-step, ClientSize.Width))); 19379new Size(ClientSize.Width, ClientSize.Height - (pt.Y - rect.Bottom) - step))); 29938UnsafeNativeMethods.SendMessage(new HandleRef(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (1)
200if (DpiHelper.IsScalingRequired && (b.Size.Width != iconsWidth || b.Size.Height != iconsHeight))
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (3)
468Math.Max(1, constraintSize.Width - borderAndPaddingWidths - DATAGRIDVIEWTEXTBOXCELL_horizontalTextMarginLeft - DATAGRIDVIEWTEXTBOXCELL_horizontalTextMarginRight), 489preferredSize = new Size(DataGridViewCell.MeasureTextSize(graphics, formattedString, cellStyle.Font, flags).Width, 513preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth);
winforms\Managed\System\WinForms\DataGridViewUtilities.cs (12)
198preferredWidth = DataGridViewCell.MeasureTextSize(graphics, val, cellStyle.Font, flags).Width; 221int allowedWidth = constraintSize.Width - borderAndPaddingWidths; 324if (sizeRequired.Width > cellBounds.Width) 332if (sizeConstraint.Width > sizeCell.Width) 334sizeConstraint.Width = sizeCell.Width; 394ptTextLocation.X = cellBounds.X + (cellBounds.Width - sizeText.Width) / 2; 399ptTextLocation.X = cellBounds.Right - sizeText.Width; 409ptTextLocation.X = cellBounds.X + (cellBounds.Width - sizeText.Width) / 2; 414ptTextLocation.X = cellBounds.Right - sizeText.Width; 424ptTextLocation.X = cellBounds.X + (cellBounds.Width - sizeText.Width) / 2; 429ptTextLocation.X = cellBounds.Right - sizeText.Width;
winforms\Managed\System\WinForms\DataObject.cs (2)
156IntPtr hBitmapNew = SafeNativeMethods.CreateCompatibleBitmap(new HandleRef(null, hDC), bm.Size.Width, bm.Size.Height); 161SafeNativeMethods.BitBlt(new HandleRef(null, dcDest), 0, 0, bm.Size.Width, bm.Size.Height, new HandleRef(null, dcSrc), 0, 0, 0x00CC0020);
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (5)
269maxSize.Width, maxSize.Height); 282int xFrame = SystemInformation.FixedFrameBorderSize.Width; 394if (pageSize.Width > maxSize.Width) 395maxSize.Width = pageSize.Width;
winforms\Managed\System\WinForms\DomainUpDown.cs (2)
606int width = LayoutUtils.OldGetLargestStringSizeInCollection(Font, Items).Width; 609width = SizeFromClientSize(width, height).Width + upDownButtons.Width;
winforms\Managed\System\WinForms\DrawListViewColumnHeaderEventArgs.cs (1)
212int padding = TextRenderer.MeasureText(" ", font).Width;
winforms\Managed\System\WinForms\DrawListViewItemEventArgs.cs (1)
173resultBounds = new Rectangle(originalBounds.X, originalBounds.Y, textSize.Width, textSize.Height);
winforms\Managed\System\WinForms\DrawListViewSubItemEventArgs.cs (1)
218int padding = TextRenderer.MeasureText(" ", font).Width;
winforms\Managed\System\WinForms\ErrorProvider.cs (7)
969UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 1038mirrordc.ViewportExtent = new Size(-(mirrordcExtent.Width), mirrordcExtent.Height); 1529x = control.Left - size.Width - iconPadding; 1553return new Rectangle(x, y, size.Width, size.Height); 1708int widthInBytes = 2 * ((size.Width +15) / bitmapBitsAllocationSize); // its in bytes. 1713for (int x = 0; x < size.Width; x++) { 1721region.Intersect(new Rectangle(0, 0, size.Width, size.Height));
winforms\Managed\System\WinForms\Form.cs (47)
1584if (value.Width < 0 || value.Height < 0 ) { 1588Properties.SetInteger(PropMaxTrackSizeWidth, value.Width); 1595if (Properties.GetInteger(PropMinTrackSizeWidth) > value.Width) { 1596Properties.SetInteger(PropMinTrackSizeWidth, value.Width); 1607if (!value.IsEmpty && (size.Width > value.Width || size.Height > value.Height)) { 1608Size = new Size(Math.Min(size.Width, value.Width), Math.Min(size.Height, value.Height)); 1742if (value.Width < 0 || value.Height < 0 ) { 1752Properties.SetInteger(PropMinTrackSizeWidth, value.Width); 1759if (Properties.GetInteger(PropMaxTrackSizeWidth) < value.Width) { 1760Properties.SetInteger(PropMaxTrackSizeWidth, value.Width); 1771if (size.Width < value.Width || size.Height < value.Height) { 1772Size = new Size(Math.Max(size.Width, value.Width), Math.Max(size.Height, value.Height)); 1781Size.Width, 3380float percX = AdjustScale(((float)newVar.Width) / ((float)baseVar.Width)); 3442if (correctClientSize.Width != currentClient.Width) { 3454bounds.Width = correct.Width; 3593NativeMethods.RECT result = new NativeMethods.RECT(0, 0, clientSize.Width, clientSize.Height); 3992correct = ApplyBoundsConstraints(cp.X, cp.Y, correct.Width, correct.Height).Size; 3994cp.Width = correct.Width; 4460p.X = (ownerRect.left + ownerRect.right - s.Width) / 2; 4463else if (p.X + s.Width > screenRect.X + screenRect.Width) 4464p.X = screenRect.X + screenRect.Width - s.Width; 4820form.SetBounds(new Rectangle(this.Left, this.Top, adjustedSize.Width, adjustedSize.Height), BoundsSpecified.None); 5067sizeGripRenderer.DrawBackground(e.Graphics, new Rectangle(sz.Width - SizeGripSize, sz.Height - SizeGripSize, SizeGripSize, SizeGripSize)); 5070ControlPaint.DrawSizeGrip(e.Graphics, BackColor, sz.Width - SizeGripSize, sz.Height - SizeGripSize, SizeGripSize, SizeGripSize); 5191m.Result = (IntPtr)(unchecked((Size.Height & 0xFFFF) << 16) | (Size.Width & 0xFFFF)); 5682restoredSize = SizeFromClientSize(restoredSize.Width, restoredSize.Height); 5685formStateEx[FormStateExWindowBoundsWidthIsClientSize]==1 ? restoredSize.Width : restoredWindowBounds.Width, 5904if (width > max.Width) { 5905width = max.Width; 5922if (width < min.Width) { 5923width = min.Width; 6040if (x != ClientSize.Width || y != ClientSize.Height) { 7184mmi.ptMinTrackSize.x = minTrack.Width; 7204if (minTrack.Width > virtualScreen.Width) { 7212mmi.ptMaxTrackSize.x = Math.Max(maxTrack.Width, minTrackWindowSize.Width); 7371if( pt.x >= (clientSize.Width - SizeGripSize) && 7854Rectangle r = new Rectangle(owner.Left, owner.Top, s.Width, SystemInformation.CaptionHeight); 7918UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight)); 7938UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight));
winforms\Managed\System\WinForms\GroupBox.cs (3)
220return new Rectangle(padding.Left, fontHeight + padding.Top, Math.Max(size.Width - padding.Horizontal, 0), Math.Max(size.Height - fontHeight - padding.Vertical, 0)); 618textLeft += textRectangle.Width - textSize.Width; 622int textRight = Math.Min( textLeft + textSize.Width, Width - 6);
winforms\Managed\System\WinForms\GroupBoxRenderer.cs (2)
172textBounds.Width = measuredBounds.Width; 265textBounds.Width = measuredBounds.Width;
winforms\Managed\System\WinForms\HtmlWindow.cs (2)
210ResizeTo(value.Width, value.Height); 434this.NativeHtmlWindow.ResizeTo(size.Width, size.Height);
winforms\Managed\System\WinForms\ImageList.cs (17)
267if (value.Width <= 0 || value.Width > maxImageWidth) { 268throw new ArgumentOutOfRangeException("ImageSize", SR.GetString(SR.InvalidBoundArgument, "ImageSize.Width", value.Width.ToString(CultureInfo.CurrentCulture), (1).ToString(CultureInfo.CurrentCulture), maxImageWidth.ToString())); 275if (imageSize.Width != value.Width || imageSize.Height != value.Height) { 276imageSize = new Size(value.Width, value.Height); 464if (size.Width == 0 || (size.Width % imageSize.Width) != 0) 544nativeImageList = new NativeImageList(SafeNativeMethods.ImageList_Create(imageSize.Width, imageSize.Height, flags, INITIAL_CAPACITY, GROWBY)); 616Draw(g, x, y, imageSize.Width, imageSize.Height, index); 725result = new Bitmap(imageSize.Width, imageSize.Height, PixelFormat.Format32bppArgb); 726targetData = result.LockBits(new Rectangle(0, 0, imageSize.Width, imageSize.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); 745result = new Bitmap(imageSize.Width, imageSize.Height); 752imageSize.Width, imageSize.Height, NativeMethods.CLR_NONE, NativeMethods.CLR_NONE, NativeMethods.ILD_TRANSPARENT); 1400if (value.Width == 0 || (value.Width % owner.ImageSize.Width) != 0) 1405int nImages = value.Width / owner.ImageSize.Width;
winforms\Managed\System\WinForms\Label.cs (9)
807get { return PreferredSize.Width; } 1093xLoc = (r.X+r.Width - 4)-pointImageSize.Width; 1096xLoc = r.X + (r.Width - pointImageSize.Width)/2; 1110return new Rectangle(xLoc, yLoc, pointImageSize.Width, pointImageSize.Height); 1268if (proposedSize.Width == 1) { 1312SizeF bounds = (proposedConstraints.Width == 1) ? 1314new SizeF(proposedConstraints.Width, proposedConstraints.Height); 1539showToolTip = (clientRect.Width < preferredSize.Width || clientRect.Height < preferredSize.Height); 1678width = preferredSize.Width;
winforms\Managed\System\WinForms\Layout\CommonProperties.cs (2)
214bounds.Width = Math.Min(bounds.Width, value.Width); 236bounds.Width = Math.Max(bounds.Width, value.Width);
winforms\Managed\System\WinForms\Layout\DockAndAnchorLayout.cs (21)
58if(bounds.Width < prefSize.Width || bounds.Height < prefSize.Height) { 78Debug.Assert((CommonProperties.GetAutoSizeMode(element) == AutoSizeMode.GrowAndShrink || newSize.Height >= oldBounds.Height && newSize.Width >= oldBounds.Width), 83location.X -= newSize.Width - oldBounds.Width; 278Rectangle newElementBounds = new Rectangle(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 289Rectangle newElementBounds = new Rectangle(remainingBounds.X, remainingBounds.Bottom - elementSize.Height, elementSize.Width, elementSize.Height); 300Rectangle newElementBounds = new Rectangle(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 311Rectangle newElementBounds = new Rectangle(remainingBounds.Right - elementSize.Width, remainingBounds.Y, elementSize.Width, elementSize.Height); 326Rectangle newElementBounds = new Rectangle(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 390Size newSize = xGetDockedSize(element, remainingSize, /* constraints = */ new Size(remainingSize.Width, 1), measureOnly); 393newSize.Width = remainingSize.Width; 395newSize.Width = Math.Max(newSize.Width, remainingSize.Width); 398Debug.Assert((measureOnly && (newSize.Width >= remainingSize.Width)) || (newSize.Width == remainingSize.Width), 448Debug.Assert((desiredSize.Width >= 0 && desiredSize.Height >= 0), "Error detected in xGetDockSize: Element size was negative."); 836prefSize.Width = Math.Max(prefSize.Width, elementSpace.Right); 851prefSize.Width = Math.Max(prefSize.Width, elementSpace.Right + anchorDest.Width); 854prefSize.Width = Math.Max(prefSize.Width, anchorDest.Right);
winforms\Managed\System\WinForms\Layout\FlowLayout.cs (9)
60if(prefSize.Width > proposedConstraints.Width || prefSize.Height> proposedConstraints.Height) { 131rowSize.Width, 135layoutSize.Width = Math.Max(layoutSize.Width, rowSize.Width); 190elementConstraints.Width = rowBounds.Width - rowSize.Width - elementProxy.Margin.Size.Width; 220Rectangle cellBounds = new Rectangle(location, new Size(requiredSize.Width, rowBounds.Height)); 233location.X += requiredSize.Width;
winforms\Managed\System\WinForms\Layout\LayoutUtils.cs (36)
58largestSize.Width = Math.Max(largestSize.Width, textSize.Width); 131if(size.Width == 0) size.Width = Int32.MaxValue; 198Math.Max(a.Width, b.Width), 204Math.Min(a.Width, b.Width), 261withinThis.X += withinThis.Width - alignThis.Width; 264withinThis.X += (withinThis.Width - alignThis.Width) / 2; 266withinThis.Width = alignThis.Width; 273withinThis.X += withinThis.Width - alignThis.Width; 276withinThis.X += (withinThis.Width - alignThis.Width) / 2; 278withinThis.Width = alignThis.Width; 311(anchorStyles & HorizontalAnchorStyles) == HorizontalAnchorStyles ? withinThis.Width : stretchThis.Width, 314if (stretchedSize.Width > withinThis.Width) { 315stretchedSize.Width = withinThis.Width; 345currentSize.Width = Math.Max(currentSize.Width, contentSize.Width); 348currentSize.Width += contentSize.Width; 395int temp = size.Width; 429return (size.Width == 0 || size.Height == 0); 433return ((size1.Width >= size2.Width) && (size1.Height >= size2.Height)); 440region1.Width = specifiedContent.Width; 441region2.X += specifiedContent.Width; 442region2.Width -= specifiedContent.Width; 445region1.X += bounds.Width - specifiedContent.Width; 446region1.Width = specifiedContent.Width; 447region2.Width -= specifiedContent.Width; 506currentSize.Width -= contentSize.Width; 585else if ((sizeCache.ConstrainingSize.Width == proposedConstraints.Width) 634return GetUnconstrainedSize(text, font, flags).Width > size.Width;
winforms\Managed\System\WinForms\Layout\TableLayout.cs (20)
196containerSize.Width = Math.Max(containerSize.Width, 1); 255containerSize.Width = Math.Max(containerSize.Width, 1); 258containerInfo.ColumnStyles[0].SetSize(Math.Max(oldWidth, Math.Min(proposedConstraints.Width, containerSize.Width))); 268proposedConstraints.Width = Math.Max(proposedConstraints.Width, 1); 312if (cols.Length != 0 && totalSpace.Width > usedSpace.Width) { 313cols[cols.Length - 1].MinSize += totalSpace.Width - usedSpace.Width; 665int expandLastElementWidth = Math.Max(0,proposedConstraints.Width - preferredSize.Width); 706if (dontHonorConstraint && (proposedConstraints.Width < Int16.MaxValue)) { 731minWidth = GetElementSize(element, new Size(0, constrainingHeight)).Width; 735minWidth = GetElementSize(element, new Size(1, 0)).Width; 736maxWidth = GetElementSize(element, Size.Empty).Width; 750int width = DistributeStyles(containerInfo.CellBorderWidth, containerInfo.ColumnStyles, containerInfo.Columns, proposedConstraints.Width, dontHonorConstraint); 753if (dontHonorConstraint && width > proposedConstraints.Width && proposedConstraints.Width > 1) { 778int currentOverflow = width - proposedConstraints.Width; 1778if (proposedContstraints.Height == 0 || proposedContstraints.Width == 0) {
winforms\Managed\System\WinForms\LinkLabel.cs (3)
703textSize.Width - iRightMargin - iLeftMargin, 1146showToolTip = (clientRect.Width < preferredSize.Width || clientRect.Height < preferredSize.Height); 1184finalrect.Width = requiredSize.Width;
winforms\Managed\System\WinForms\ListBox.cs (4)
640Size = new Size(oldSize.Width + 1, oldSize.Height); 778width = SizeFromClientSize(new Size(MaxItemWidth, height)).Width; 1361return Math.Max(oldMax, textSize.Width); 2280Rectangle rect = new Rectangle(0, 0, this.Size.Width - 1, this.Size.Height - 1);
winforms\Managed\System\WinForms\ListView.cs (6)
1653if (value.IsEmpty || value.Height <= 0 || value.Width <= 0) { 1662tileViewInfo.sizeTile = new NativeMethods.SIZE(tileSize.Width, tileSize.Height); 5126textWidth = Size.Ceiling(g.MeasureString(text, this.Font)).Width; 5350tileViewInfo.sizeTile = new NativeMethods.SIZE(this.TileSize.Width, this.TileSize.Height); 6150UnsafeNativeMethods.SendMessage(new HandleRef(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 6231Rectangle rect = new Rectangle(0, 0, this.Size.Width - 1, this.Size.Height - 1);
winforms\Managed\System\WinForms\MaskedTextBox.cs (1)
3181Rectangle rect = new Rectangle(0, 0, this.Size.Width - 1, this.Size.Height - 1);
winforms\Managed\System\WinForms\MonthCalendar.cs (10)
425SetCalendarDimensions(value.Width, value.Height); 1494Debug.Assert(minSize.Width > INSERT_WIDTH_SIZE, "Divide by 0"); 1495int nCols = (newDimensionLength - scaledExtraPadding) /minSize.Width; 1499minSize.Width = (minSize.Width + INSERT_WIDTH_SIZE) * dimensions.Width - INSERT_WIDTH_SIZE; 1506if (maxTodayWidth > minSize.Width) { 1562return preferredSize.Width; 1960if (width > max.Width) 1961width = max.Width; 2058if (dimensions.Width != x || dimensions.Height != y) {
winforms\Managed\System\WinForms\NativeMethods.cs (1)
2732hicon = SafeNativeMethods.CopyImage(new HandleRef(icon, icon.Handle), NativeMethods.IMAGE_ICON, icon.Size.Width, icon.Size.Height, 0);
winforms\Managed\System\WinForms\NumericUpDown.cs (5)
855int textWidth = TextRenderer.MeasureText(GetNumberText(testNumber), this.Font).Width; 865int shortTextWidth = TextRenderer.MeasureText(shortText, this.Font).Width; 872int width = SizeFromClientSize(textWidth, height).Width + upDownButtons.Width; 890if(digitSize.Width >= digitWidth) { 891digitWidth = digitSize.Width;
winforms\Managed\System\WinForms\PictureBox.cs (2)
462float ratio = Math.Min((float)ClientRectangle.Width / (float)imageSize.Width, (float)ClientRectangle.Height / (float)imageSize.Height); 463result.Width = (int)(imageSize.Width * ratio);
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (15)
436double zoomX = ((double) controlPhysicalSize.Width - border*(columns + 1)) / (columns*pageSize.Width); 441imageSize = new Size((int) (zoom*pageSize.Width), (int) (zoom*pageSize.Height)); 442int virtualX = (imageSize.Width * columns) + border * (columns +1); 579Point offset = new Point(Math.Max(0, (Size.Width - virtualPixels.X) / 2), 605double zoomX = ((double) controlPhysicalSize.Width - border*(columns + 1)) / (columns*pageSize.Width); 610imageSize = new Size((int) (zoom*pageSize.Width), (int) (zoom*pageSize.Height)); 679return new Size(PhysicalToPixels(physicalSize.Width, dpi.X), 693return new Size(PixelsToPhysical(pixels.Width, dpi.X), 733int maxPos = Math.Max(Width, virtualSize.Width /*- Width*/); 743position.X = Math.Min(position.X, virtualSize.Width - Width); 773info.nMax = Math.Max(Width, virtualSize.Width) - 1; 839maxPos = Math.Max(Width, virtualSize.Width /*- Width*/); 903maxPos = Math.Max(Width, virtualSize.Width /*- Width*/);
winforms\Managed\System\WinForms\PropertyGrid.cs (12)
1654if (DpiHelper.IsScalingRequired && (image.Size.Width != normalButtonSize.Width || image.Size.Height != normalButtonSize.Height)) { 2064if (size.Width != 16 || size.Height != 16) { 2464this.imageList[LARGE_BUTTONS].Images.Add(new Bitmap((Bitmap)images[i], largeButtonSize.Width, largeButtonSize.Height)); 3038dcOptHeight = doccomment.GetOptimalHeight(Size.Width - cyDivider); 3051hcOptHeight = hotcommands.GetOptimalHeight(Size.Width - cyDivider); 3084doccomment.SetBounds(0, endSize - height, Size.Width, height); 3123hotcommands.SetBounds(0, endSize - height, Size.Width, height); 3128gridView.Size = new Size(Size.Width, endSize - gridView.Location.Y); 3208Invalidate(new Rectangle(0, me.Y - cyDivider, Size.Width, me.Y + cyDivider)); 3212gridView.Invalidate(new Rectangle(0, gridView.Size.Height - cyDivider, Size.Width, cyDivider)); 3288int width = Size.Width;
winforms\Managed\System\WinForms\PropertyGridInternal\DocComment.cs (3)
144size.Width = Math.Max(0, size.Width - 2 * cBorder); 149size.Width, 155size.Width,
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (2)
189int overHang = (Location.X + Size.Width) - SystemInformation.VirtualScreen.Width; 216UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\PropertyGridInternal\HotCommands.cs (1)
68return new Rectangle(4, 4, sz.Width - 8, sz.Height - 8);
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (42)
330if ((DpiHelper.IsScalingRequired || DpiHelper.EnableDpiChangedHighDpiImprovements) && (b.Size.Width != iconsWidth || b.Size.Height != iconsHeight)) { 1257return ptOurLocation.X + GetIPELabelIndent(gridEntry) + size.Width; 1636size.Width = Math.Max(rect.Width + 1, size.Width); 1641loc.X = Math.Min(rectScreen.X + rectScreen.Width - size.Width, 1642Math.Max(rectScreen.X, loc.X + rect.X + rect.Width - size.Width)); 1659if (this.Width == size.Width && this.Height == size.Height) { 1663SafeNativeMethods.SetWindowPos(new HandleRef(this.dropDownHolder, this.dropDownHolder.Handle), NativeMethods.NullHandleRef, loc.X, loc.Y, size.Width, size.Height, flags); 1665dropDownHolder.SetBounds(loc.X, loc.Y, size.Width, size.Height); 1715size.Width = Math.Max(rect.Width + 1, size.Width); 1720loc.X = Math.Min(rectScreen.X + rectScreen.Width - size.Width, 1721Math.Max(rectScreen.X, loc.X + rect.X + rect.Width - size.Width)); 1736dropDownHolder.SetBounds(loc.X, loc.Y, size.Width, size.Height); 1923if (x < 0 || x > size.Width + ptOurLocation.X) 2116if (size.Width == 0) { 2118if (sizeWindow.Width > 10) { 2120size.Width = sizeWindow.Width; 2126size.Width -= sizeScroll.Width; 2144rect.Width = size.Width - 1; 2152rect.Width = size.Width - InternalLabelWidth; 2227boundsScroll.X = sizeWindow.Width - boundsScroll.Width - 1; 2347int widthPS = GetOurSize().Width; 2367Invalidate(new Rectangle(left, 0, Size.Width - left, Size.Height)); 2446if ((Size.Width > doubleOffset) && (Size.Height > doubleOffset)) { 2448ControlPaint.DrawFocusRectangle(g, new Rectangle(offset_2Units, offset_2Units, Size.Width - doubleOffset, Size.Height - doubleOffset)); 2607Rectangle clearRect = new Rectangle(1, 1, Size.Width - 2, Size.Height - 2); 2813if (Math.Abs(screenPoint.X - rowSelectPos.X) < SystemInformation.DoubleClickSize.Width && 3516int cLineEnd = loc.X + size.Width; 3558Rectangle clearRect = new Rectangle(1, yPos, Size.Width - 2, Size.Height - yPos - 1); 3566g.DrawRectangle(borderPen, 0, 0, sizeWindow.Width - 1, sizeWindow.Height - 1); 4428Rectangle rectTarget = new Rectangle(rect.X+rect.Width-sizeBtn.Width, 4430sizeBtn.Width,rect.Height); 4433rect.Width -= (sizeBtn.Width); 4534if (size.Width >= 0) { 4536labelWidth = ptOurLocation.X + (int) ((double)size.Width / labelRatio); 4552if (adjustWidth && size.Width >= 0) { 4553labelRatio = ((double) GetOurSize().Width / (double) (oldWidth - ptOurLocation.X)); 4895if (labelWidth != -1 && size.Width > 0) { 4896if (labelWidth > ptOurLocation.X + size.Width) { 4897labelWidth = ptOurLocation.X + (int) ((double)size.Width / labelRatio); 4900labelRatio = ((double) GetOurSize().Width / (double) (labelWidth - ptOurLocation.X)); 5860if ((dragBaseRect.Width - delta) > MinDropDownSize.Width) 6049this.Size = new Size(this.Size.Width, this.PreferredSize.Height);
winforms\Managed\System\WinForms\ScrollableControl.cs (12)
166if (value.Width < 0 || value.Height < 0) { 169SetAutoScrollMargin(value.Width, value.Height); 287if(AutoScrollMinSize.Width != 0 && AutoScrollMinSize.Height != 0) { 288displayRectangle.Width = Math.Max(displayRectangle.Width, AutoScrollMinSize.Width); 477scrollMargin.Width += current.Size.Width; 485maxX = userAutoScrollMinSize.Width + scrollMargin.Width; 498if (layoutBounds.Width > maxX) { 500maxX = layoutBounds.Width; 557int ctlRight = -display.X + bounds.X + bounds.Width + scrollMargin.Width; 948int xMargin = scrollMargin.Width; 1054if (x != requestedScrollMargin.Width
winforms\Managed\System\WinForms\SplitContainer.cs (2)
1447if (DesignMode && Width != DefaultSize.Width && value + Panel2MinSize + SplitterWidth > Width) { 1471if (DesignMode && Width != DefaultSize.Width && value + Panel1MinSize + SplitterWidth > Width) {
winforms\Managed\System\WinForms\Splitter.cs (1)
749maxSize = clientSize.Width - dockWidth - minExtra;
winforms\Managed\System\WinForms\StatusBar.cs (5)
105sizeGripWidth = elementSize.Width; 111sizeGripWidth += elementSize.Width; 598offsets[0] = sz.Width; 1002int border = SystemInformation.Border3DSize.Width; 1823UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\StatusBarPanel.cs (4)
204if (value != null && (((Icon)value).Height > SystemInformation.SmallIconSize.Height || ((Icon)value).Width > SystemInformation.SmallIconSize.Width)) { 558sz.Width += this.icon.Size.Width + 5; 562int width = sz.Width + SystemInformation.BorderSize.Width*2 + PANELTEXTINSET*2 + PANELGAP;
winforms\Managed\System\WinForms\StatusStrip.cs (3)
234return new Rectangle(statusStripSize.Width - gripWidth, statusStripSize.Height - gripHeight, gripWidth, gripHeight); 308if (proposedSize.Width == 1) { 378noMansLand.X += ClientSize.Width + 1;
winforms\Managed\System\WinForms\SystemInformation.cs (1)
1041return new Rectangle(0, 0, size.Width, size.Height);
winforms\Managed\System\WinForms\TabControl.cs (4)
574if (value.Width < 0 || value.Height < 0) { 1077SendMessage(NativeMethods.TCM_SETITEMSIZE, 0, (int)NativeMethods.Util.MAKELPARAM(itemSize.Width, itemSize.Height)); 1636Size = new Size(size.Width + 1, size.Height); 2205UnsafeNativeMethods.SendMessage(new HandleRef(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\TextBox.cs (1)
849Rectangle rect = new Rectangle(0, 0, this.Size.Width - 1, this.Size.Height - 1);
winforms\Managed\System\WinForms\ThreadExceptionDialog.cs (4)
243textSize = Size.Ceiling(g.MeasureString(messageText, Font, textSize.Width)); 249if (textSize.Width < scaledMaxTextWidth) textSize.Width = scaledMaxTextWidth; 252int width = textSize.Width + scaledPaddingWidth; 293textSize.Width, textSize.Height);
winforms\Managed\System\WinForms\ToolBar.cs (5)
399if (value.Width < 0 || value.Height < 0) 772maxWidth = ButtonSize.Width; 1310Size = new Size(size.Width + 1, size.Height); 1440SendMessage(NativeMethods.TB_SETBUTTONSIZE, 0, NativeMethods.Util.MAKELPARAM((int)(buttonSize.Width*currentScaleDX), (int)(buttonSize.Height*currentScaleDY))); 1750leftTop.x -= (this.ButtonSize.Width + tooltipWidth + 2);
winforms\Managed\System\WinForms\ToolBarButton.cs (16)
481width = buttonSize.Width; 488if (textSize.Width == 0) 489width = imageSize.Width + edge.Width * 4; 491width = imageSize.Width + textSize.Width + edge.Width * 6; 494if (imageSize.Width > textSize.Width) 495width = imageSize.Width + edge.Width * 4; 497width = textSize.Width + edge.Width * 4; 504width = this.parent.ButtonSize.Width; 509width = edge.Width * 2; 553int buttonWidth = Parent.ButtonSize.Width;
winforms\Managed\System\WinForms\ToolStrip.cs (9)
2450if (proposedSize.Width == 1) { 2495maxSize.Width += itemMargin.Horizontal + prefItemSize.Width; 2551maxSize.Width = Math.Max(maxSize.Width, itemMargin.Horizontal + preferredSize.Width); 3728SafeNativeMethods.BitBlt(itemHDC, 0, 0, item.Size.Width, item.Size.Height, toolStripHDC, item.Bounds.X, item.Bounds.Y, NativeMethods.SRCCOPY); 3736SafeNativeMethods.BitBlt(toolStripHDC, item.Bounds.X, item.Bounds.Y, item.Size.Width, item.Size.Height, itemHDC, 0, 0, NativeMethods.SRCCOPY); 5226if ((cachedHDCSize.Width < bitmapSize.Width) 5236cachedItemBitmap = new HandleRef(this, SafeNativeMethods.CreateCompatibleBitmap(toolStripHDC, bitmapSize.Width, bitmapSize.Height));
winforms\Managed\System\WinForms\ToolStripButton.cs (1)
211prefSize.Width = Math.Max(prefSize.Width, standardButtonWidth);
winforms\Managed\System\WinForms\ToolStripComboBox.cs (1)
496preferredSize.Width = Math.Max(preferredSize.Width, 75);
winforms\Managed\System\WinForms\ToolStripDropDownButton.cs (3)
278int widthOfDropDown = dropDownArrowSize.Width + scaledDropDownArrowPadding.Horizontal; 285dropDownArrowRect = new Rectangle(scaledDropDownArrowPadding.Left,0, dropDownArrowSize.Width, ownerItem.Bounds.Height); 289dropDownArrowRect = new Rectangle(options.client.Right,0, dropDownArrowSize.Width, ownerItem.Bounds.Height);
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (19)
352tabWidth = TextRenderer.MeasureText("\t", this.Font).Width; 354menuItemTextSize.Width += tabWidth + shortcutTextSize.Width; 359maxTextSize.Width = Math.Max(maxTextSize.Width, menuItemTextSize.Width); 368maxImageSize.Width = Math.Max(maxImageSize.Width, imageSize.Width); 373maxCheckSize.Width = Math.Max(checkedImageSize.Width, maxCheckSize.Width); 379maxNonMenuItemSize.Width = Math.Max(item.Bounds.Width, maxNonMenuItemSize.Width); 390bool useDefaultCheckMarginWidth = (ShowCheckMargin && (maxCheckSize.Width == 0)); 391bool useDefaultImageMarginWidth = (ShowImageMargin && (maxImageSize.Width == 0)); 400maxTextSize.Width = Math.Max(maxTextSize.Width, maxNonMenuItemSize.Width); 405int extraImageWidth = Math.Max(0, maxImageSize.Width - scaledDefaultImageSize.Width); 417 checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, maxCheckSize.Width, maxItemSize.Height), ContentAlignment.MiddleCenter); 422imageRectangle = LayoutUtils.Align(maxImageSize, new Rectangle(nextPoint.X, nextPoint.Y, maxImageSize.Width, maxItemSize.Height), ContentAlignment.MiddleCenter); 490int width = maxItemSize.Width; 834preferredSize.Width = dropDownMenu.MaxItemSize.Width - dropDownMenu.PaddingToTrim;
winforms\Managed\System\WinForms\ToolStripGrip.cs (4)
117if (preferredSize.Width > constrainingSize.Width) { 118preferredSize.Width = constrainingSize.Width; 163if (deltaX >= DragSize.Width) {
winforms\Managed\System\WinForms\ToolStripItem.cs (2)
4788|| cachedSize.Width <= proposedConstraints.Width)) {
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (2)
339if (DpiHelper.IsScalingRequired && (b.Size.Width != desiredIconSize.Width || b.Size.Height != desiredIconSize.Height))
winforms\Managed\System\WinForms\ToolStripOverflowButton.cs (1)
110preferredSize.Width = Math.Min(constrainingSize.Width, maxWidth);
winforms\Managed\System\WinForms\ToolStripPanelCell.cs (9)
179if (MaximumSize.Width >= Control.PreferredSize.Width) { 187if (MaximumSize.Width + growBy >= Control.PreferredSize.Width) { 188int freed = Control.PreferredSize.Width - MaximumSize.Width; 196if (MaximumSize.Width + growBy < Control.PreferredSize.Width) { 243preferredSize.Width = constrainingSize.Width;
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (6)
448if (cachedBounds.Width > minSize.Width) { 449spaceToFree -= (cachedBounds.Width - minSize.Width); 451cachedBounds.Width = (spaceToFree < 0) ? minSize.Width + -spaceToFree : minSize.Width; 996return totalSize.Width < DisplayRectangle.Width; 1311int controlToDragWidth = (toolStripToDrag.AutoSize) ? toolStripToDrag.PreferredSize.Width : toolStripToDrag.Width;
winforms\Managed\System\WinForms\ToolStripRenderer.cs (4)
937using (Bitmap textBmp = new Bitmap(textSize.Width, textSize.Height,PixelFormat.Format32bppPArgb)) { 1079Bitmap disabledBitmap = new Bitmap(size.Width, size.Height); 1083new Rectangle(0, 0, size.Width, size.Height), 10840, 0, size.Width, size.Height,
winforms\Managed\System\WinForms\ToolStripScrollButton.cs (1)
154preferredSize.Width = (ParentInternal != null) ? ParentInternal.Width - 2 : preferredSize.Width; // Two for border
winforms\Managed\System\WinForms\ToolStripSeparator.cs (1)
432return new Size(constrainingSize.Width, WINBAR_SEPARATORTHICKNESS);
winforms\Managed\System\WinForms\ToolStripSplitStackLayout.cs (18)
123currentWidth += itemSize.Width + item.Margin.Horizontal; 125int overflowWidth = (OverflowRequired) ? OverflowButtonSize.Width : 0; 231noMansLand.X += toolStrip.ClientSize.Width + 1; 261bool needOverflow = toolStrip.CanOverflow && ((OverflowRequired) || (OverflowSpace >= OverflowButtonSize.Width)); 329x = lastRight - (itemMargin.Right + itemSize.Width); 332alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x,y,itemSize.Width, itemSize.Height) 333: Rectangle.Union(alignedRightItems, new Rectangle(x,y,itemSize.Width, itemSize.Height)); 344lastLeft = x + itemSize.Width + itemMargin.Right; 345alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x,y,itemSize.Width, itemSize.Height) 346: Rectangle.Union(alignedLeftItems, new Rectangle(x,y,itemSize.Width, itemSize.Height)); 462alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x,y,itemSize.Width, itemSize.Height) 463: Rectangle.Union(alignedRightItems, new Rectangle(x,y,itemSize.Width, itemSize.Height)); 470alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x,y,itemSize.Width, itemSize.Height) 471: Rectangle.Union(alignedLeftItems, new Rectangle(x,y,itemSize.Width, itemSize.Height)); 488itemSize.Width = Math.Max(toolStripPreferredSize.Width - itemMargin.Horizontal -1, 0); 615freedSpace += (horizontal) ? itemSize.Width + itemMargin.Horizontal : itemSize.Height + itemMargin.Vertical; 626spaceNeeded += (horizontal) ? OverflowButtonSize.Width : OverflowButtonSize.Height; 633this.OverflowSpace += (horizontal) ? itemSize.Width + itemMargin.Horizontal : itemSize.Height + itemMargin.Vertical;
winforms\Managed\System\WinForms\ToolTip.cs (8)
906UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 1763Point optimalPoint = this.GetOptimalToolTipPosition(tool, toolRectangle, bubbleSize.Width, bubbleSize.Height); 2164if (moveToLocation.X + tipSize.Width > screen.WorkingArea.Right) { 2165moveToLocation.X = screen.WorkingArea.Right - tipSize.Width; 2175moveToLocation.X, moveToLocation.Y, tipSize.Width, tipSize.Height, 2337Math.Min(currentTooltipSize.Width-2*XBALLOONOFFSET, screen.WorkingArea.Width): 2338Math.Min(currentTooltipSize.Width, screen.WorkingArea.Width); 2355r.left, r.top, currentTooltipSize.Width, currentTooltipSize.Height,
winforms\Managed\System\WinForms\TreeNode.cs (1)
640visible = (rc.bottom > 0 && rc.right > 0 && rc.top < size.Height && rc.left < size.Width);
winforms\Managed\System\WinForms\TreeView.cs (4)
1764UnsafeNativeMethods.SendMessage(new HandleRef(toolTip, toolTip.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 2828bounds = new Rectangle(textLoc, new Size(textSize.Width, bounds.Height)); 3137Rectangle rect = new Rectangle(0, 0, this.Size.Width - 1, this.Size.Height - 1); 3210UnsafeNativeMethods.SendMessage(new HandleRef(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\UpDownBase.cs (2)
456base.MaximumSize = new Size(value.Width, 0); 464base.MinimumSize = new Size(value.Width, 0);
winforms\Managed\System\WinForms\WebBrowserBase.cs (4)
849extent = SetExtent(extent.Width, extent.Height); 852Bounds = new Rectangle(location.X, location.Y, extent.Width, extent.Height); 1985if (s.Width == -1) { // Invalid value. Use WebBrowserBase.Bounds instead, when this is the case. 1990wp->cx = s.Width;
System.Windows.Forms.DataVisualization (70)
Common\General\Legend.cs (47)
450 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 453 this._offset.Width = (int)Math.Ceiling(singleWCharacterSize.Width / 2f); 454 this._offset.Height = (int)Math.Ceiling(singleWCharacterSize.Width / 3f); 457 this._itemColumnSpacingRel = (int)(singleWCharacterSize.Width * (this._itemColumnSpacing / 100f)); 511 legendPosition.Location.X + this.GetBorderSize() + this._offset.Width, 513 legendPosition.Width - (this.GetBorderSize() + this._offset.Width) * 2, 529 legendPosition.X + this._offset.Width + this.GetBorderSize(), 531 legendPosition.Width - 2 * (this._offset.Width + this.GetBorderSize()), 827 cellPosition.X += itemHalfSpacing.Width; 843 cellPosition.X += this.GetSeparatorSize(this.ItemColumnSeparator).Width; 917 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 920 this._offset.Width = (int)Math.Ceiling(singleWCharacterSize.Width / 2f); 921 this._offset.Height = (int)Math.Ceiling(singleWCharacterSize.Width / 3f); 922 this._itemColumnSpacingRel = (int)(singleWCharacterSize.Width * (this._itemColumnSpacing / 100f)); 960 legenItemsMaxSize.Width -= 2 * (this._offset.Width + this.GetBorderSize()); 1034 optimalSize.Width = (legenItemsMaxSize.Width - horizSpaceLeft); 1035 optimalSize.Width = Math.Max(optimalSize.Width, titleSize.Width); 1036 optimalSize.Width += 2 * (this._offset.Width + this.GetBorderSize()); 1051 if(optimalSize.Width > maxSize.Width) 1053 optimalSize.Width = maxSize.Width; 1059 if(optimalSize.Width < 0) 1332 averageColumnWidth = (int)Math.Round((double)(legendSize.Width - horSpaceLeft) / columnNumber) / 2; 1742 this.singleWCharacterSize.Width = doubleCharacterSize.Width - this.singleWCharacterSize.Width; 1796 cellSize.Width = (int)Math.Max(cellSize.Width, legendColumn.MinimumWidth * singleWCharacterSize.Width / 100f); 1800 cellSize.Width = (int)Math.Min(cellSize.Width, legendColumn.MaximumWidth * singleWCharacterSize.Width / 100f); 1805 cellWidths[currentColumn, currentRow, cellIndex] = cellSize.Width; 1893 if(headerTextSize.Width > subColumnSizes[currentColumn, currentSubColumn]) 1896 subColumnSizes[currentColumn, currentSubColumn] = headerTextSize.Width; 1902 (int)Math.Max(subColumnSizes[currentColumn, currentSubColumn], legendColumn.MinimumWidth * singleWCharacterSize.Width / 100f); 1907 (int)Math.Min(subColumnSizes[currentColumn, currentSubColumn], legendColumn.MaximumWidth * singleWCharacterSize.Width / 100f); 2006 totalTableColumnSpacingWidth += this.GetSeparatorSize(this.ItemColumnSeparator).Width; 2025 horizontalSpaceLeft = legendItemsAreaSize.Width - totalWidth - totalTableColumnSpacingWidth; 2495 separatorRect.X += this.GetBorderSize() + this._offset.Width; 2496 separatorRect.Width = this.GetSeparatorSize(this.ItemColumnSeparator).Width; 3977 titleMaxSize.Width -= this.GetBorderSize() * 2 + this._offset.Width; 3988 titleSize.Width += this._offset.Width; 4015 headerSize.Width += this._offset.Width; 4226 prevRightLocation += this.GetSeparatorSize(this.ItemColumnSeparator).Width; 4317 rect.X += this._offset.Width; 4319 rect.Width -= this.GetBorderSize() * 2 + this._offset.Width;
Common\General\LegendColumns.cs (16)
403 if(value.Width < 0 || value.Height < 0) 1194 if(value.Width < 0 || value.Height < 0) 1220 if(value.Width < 0 || value.Height < 0) 1447 this.cellPosition.X += (int)(this.Margins.Left * singleWCharacterSize.Width / 100f); 1449 this.cellPosition.Width -= (int)(this.Margins.Left * singleWCharacterSize.Width / 100f) 1450 + (int)(this.Margins.Right * singleWCharacterSize.Width / 100f); 1500 cellSize.Width = (int)(Math.Abs(this.SeriesSymbolSize.Width) * singleWCharacterSize.Width / 100f); 1518 cellSize.Width = (int)(Math.Abs(this.ImageSize.Width) * singleWCharacterSize.Width / 100f); 1538 cellSize.Width += (int)((this.Margins.Left + this.Margins.Right) * singleWCharacterSize.Width / 100f); 2109 if(this.ImageSize.Width > 0) 2111 int newWidth = (int)(this.ImageSize.Width * singleWCharacterSize.Width / 100f); 2224 if(this.SeriesSymbolSize.Width >= 0) 2226 int newWidth = (int)(this.SeriesSymbolSize.Width * singleWCharacterSize.Width / 100f);
Common\Utilities\XmlSerializer.cs (1)
2724 writer.Write(((Size)obj).Width);
WinForm\ChartWinControl.cs (6)
743 chartPicture.Width = this.Size.Width; 1380chartPicture.InspectChartDimensions(value.Width, value.Height); 2147ControlPaint.DrawFocusRectangle(g, new Rectangle(1, 1, Size.Width - 2, Size.Height - 2)); 2164Rectangle topBorder = new Rectangle(1, 1, Size.Width - 2, 1); 2167Rectangle rightBorder = new Rectangle(Size.Width - 2, 1, 1, Size.Height - 2); 2170Rectangle bottomBorder = new Rectangle(1, Size.Height - 2, Size.Width - 2, 1);
System.Workflow.Activities (101)
Designers\SetStateDesigner.cs (2)
94bounds.Left + margin.Width, 97bounds.Width - margin.Width * 2,
Designers\StateDesigner.cs (5)
1463Size newSize = new Size(this.Size.Width, this.Size.Height + ((maximumY + DefaultStateDesignerAutoLayoutDistance) - this.Bounds.Bottom)); 1503bounds.Offset(Separator.Width - this.Location.X, Separator.Height - this.Location.Y); 1504newSize.Width = Math.Max(newSize.Width, bounds.Right); 1508newSize.Width = Math.Max(newSize.Width, this.MinimumSize.Width);
Designers\StateDesigner.Layouts.cs (53)
449int width = _imageSize.Width + ImagePadding + _textSize.Width; 450width += ambientTheme.Margin.Width * 2; 462origin.X += ambientTheme.Margin.Width; 465origin.X += _imageSize.Width + ImagePadding; 647int maxEventDrivenWidth = newSize.Width - (EventDrivenPadding * 2); 651if (size.Width > maxEventDrivenWidth) 668int layoutWidth = layout.Size.Width + 2 * (selectionSize.Width + ambientTheme.Margin.Width); 669minimumSize.Width = Math.Max(minimumSize.Width, layoutWidth); 678size.Width = Math.Max(containerSize.Width, minimumSize.Height); 773size.Width += layout.Size.Width + _breadCrumbSeparatorSize.Width; 788location.X += layout.Size.Width + _breadCrumbSeparatorSize.Width; 811_breadCrumbSeparatorSize.Width, 969minimumSize.Width = designerTheme.BorderWidth * 2 + 10 + _textLayout.Size.Width + _imageLayout.Size.Width; 975size.Width = Math.Max(minimumSize.Width, containerSize.Width); 983origin.X += margin.Width; 1044int maxStringWidth = _textLayout.Size.Width; 1045int xPos = (this.Location.X + this.Size.Width / 2 - maxStringWidth / 2); 1049if ((xPos + maxStringWidth) > (this.Bounds.Right - margin.Width)) 1050maxStringWidth = (this.Bounds.Right - margin.Width) - xPos; 1103minimumSize.Width = Math.Max(minimumSize.Width, RealMinimumSize.Width); 1132int minWidth = Math.Max(_titleBarLayout.MinimumSize.Width, _eventHandlersLayout.MinimumSize.Width); 1136size.Width = Math.Max(minWidth, size.Width); 1141int maximumX = size.Width; 1159maximumX = Math.Max(maximumX, designer.Size.Width); 1172_titleBarLayout.ResizeLayout(new Size(size.Width, _titleBarLayout.Size.Height)); 1204Size size = new Size(this.Size.Width, this.Size.Height - _titleBarLayout.Bounds.Height); 1244_eventHandlersLayout.ResizeLayout(new Size(newSize.Width, _eventHandlersLayout.Size.Height)); 1245_titleBarLayout.ResizeLayout(new Size(newSize.Width, _titleBarLayout.Size.Height)); 1320size.Width = Math.Max(size.Width, minSize.Width); 1331size.Width = Math.Max(size.Width, activeDesignerSize.Width + ActiveDesignerPadding * 2); 1332size.Width = Math.Max(size.Width, _titleBarLayout.Size.Width); 1333size.Width = Math.Max(size.Width, _breadCrumbBarLayout.Size.Width); 1342_titleBarLayout.ResizeLayout(new Size(size.Width, _titleBarLayout.Size.Height)); 1347size.Width = Math.Max(size.Width, activeDesigner.Size.Width + ActiveDesignerPadding * 2); 1348size.Width = Math.Max(size.Width, _designerLayout.Size.Width); 1377bounds.Left + (bounds.Width - _designerLayout.Size.Width) / 2, 1385origin.X = bounds.Left + (bounds.Width - activeDesignerSize.Width) / 2; 1406_titleBarLayout.ResizeLayout(new Size(newSize.Width, _titleBarLayout.Size.Height));
Designers\StateDesignerConnector.cs (4)
174Size arrowCapSize = new Size(theme.ConnectorSize.Width / 5, theme.ConnectorSize.Height / 5); 211Size arrowCapSize = new Size(theme.ConnectorSize.Width / 5, theme.ConnectorSize.Height / 5); 229Rectangle bounds = new Rectangle(point.X - size.Width / 2, point.Y - size.Height / 2, size.Width, size.Height);
Designers\StateMachineDesignerPaint.cs (19)
44textSize = graphics.MeasureString(text, font, new SizeF(maxSize.Width, maxSize.Height), format); 121int capSize = (startSegment[0].Y == startSegment[1].Y) ? connectorCapSize.Width : connectorCapSize.Height; 123capSize = Math.Min(Math.Min(capSize, maxCapSize.Width), maxCapSize.Height); 148int capSize = (endSegment[0].Y == endSegment[1].Y) ? connectorCapSize.Width : connectorCapSize.Height; 150capSize = Math.Min(Math.Min(capSize, maxCapSize.Width), maxCapSize.Height); 387lineCapPath.AddLine(capSize.Width / 2, -capSize.Height, 0, 0); 388lineCapPath.AddLine(0, 0, -capSize.Width / 2, -capSize.Height); 389lineCapPath.AddLine(-capSize.Width / 2, -capSize.Height, 0, -capSize.Height + arcRadius); 390lineCapPath.AddLine(0, -capSize.Height + arcRadius, capSize.Width / 2, -capSize.Height); 396lineCapPath.AddLine(0, -capSize.Height, capSize.Width / 2, -capSize.Height / 2); 397lineCapPath.AddLine(capSize.Width / 2, -capSize.Height / 2, 0, 0); 398lineCapPath.AddLine(0, 0, -capSize.Width / 2, -capSize.Height / 2); 399lineCapPath.AddLine(-capSize.Width / 2, -capSize.Height / 2, 0, -capSize.Height); 404lineCapPath.AddEllipse(new Rectangle(-capSize.Width / 2, -capSize.Height, capSize.Width, capSize.Height)); 409lineCapPath.AddRectangle(new Rectangle(-capSize.Width / 2, -capSize.Height, capSize.Width, capSize.Height)); 415lineCapPath.AddPath(ActivityDesignerPaint.GetRoundedRectanglePath(new Rectangle(-capSize.Width / 2, -capSize.Height, capSize.Width, capSize.Height), arcRadius), true);
Designers\StateMachineWorkflowDesigner.cs (5)
81minimumSize.Width = Math.Max(minimumSize.Width, MinSize.Width); 85minimumSize.Width = Math.Max(minimumSize.Width, ParentView.ViewPortSize.Width - StateDesigner.Separator.Width * 2);
Designers\WhileDesigner.cs (6)
47connectionPoint = new Point(imageRectangle.Right + e.AmbientTheme.Margin.Width / 2, imageRectangle.Top + imageRectangle.Height / 2); 49connectionPoint = new Point(textRectangle.Right + e.AmbientTheme.Margin.Width / 2, textRectangle.Top + textRectangle.Height / 2); 51connectionPoint = new Point(bounds.Left + bounds.Width / 2 + e.AmbientTheme.Margin.Width / 2, bounds.Top + e.AmbientTheme.Margin.Height / 2); 56points[1].X = bounds.Right - compositeDesignerTheme.ConnectorSize.Width / 3; 58points[2].X = bounds.Right - compositeDesignerTheme.ConnectorSize.Width / 3; 87containerSize.Width += 2 * compositeDesignerTheme.ConnectorSize.Width;
Rules\Design\Dialogs\IntellisenseTextBox.cs (7)
59this.listBoxAutoComplete.Columns.Add(Messages.No, this.listBoxAutoComplete.Size.Width); 442if (listboxRectangle.Right > topLevelControlSize.Width) 444if (this.listBoxAutoComplete.Size.Width > topLevelControlSize.Width) 445this.listBoxAutoComplete.Size = new Size(topLevelControlSize.Width, this.listBoxAutoComplete.Height); 447locationInDialog = new Point(topLevelControlSize.Width - this.listBoxAutoComplete.Size.Width, locationInDialog.Y);
System.Workflow.ComponentModel (472)
AuthoringOM\Design\ActivityDesigner.cs (35)
237value.Width = Math.Max(value.Width, MinimumSize.Width); 540textRectangle.X = bounds.Left + ambientTheme.Margin.Width; 541textRectangle.X += (Image != null) ? designerTheme.ImageSize.Width + ambientTheme.Margin.Width : 0; 564imageRectangle.X = bounds.Left + WorkflowTheme.CurrentTheme.AmbientTheme.Margin.Width; 1060Bitmap designerImage = new Bitmap(Size.Width + (4 * ambientTheme.Margin.Width), Size.Height + (4 * ambientTheme.Margin.Height), PixelFormat.Format32bppArgb); 1068graphics.TranslateTransform(-Location.X + 2 * ambientTheme.Margin.Width, -Location.Y + 2 * ambientTheme.Margin.Height); 1714requestedLineSize.Width += ((requestedLineSize.Width % Text.Length) > 0) ? 1 : 0; 1717this.textSize.Width = MinimumSize.Width - 2 * e.AmbientTheme.Margin.Width; 1719this.textSize.Width -= e.DesignerTheme.ImageSize.Width + e.AmbientTheme.Margin.Width; 1720this.textSize.Width = Math.Min(this.textSize.Width, actualTextSize.Width); 1721this.textSize.Width = Math.Max(this.textSize.Width, requestedLineSize.Width); 1725int textLines = actualTextSize.Width / this.textSize.Width; 1726textLines += ((actualTextSize.Width % this.textSize.Width) > 0) ? 1 : 0; 1736size.Width = 2 * e.AmbientTheme.Margin.Width + ((Image != null) ? (e.DesignerTheme.ImageSize.Width + e.AmbientTheme.Margin.Width) : 0) + this.textSize.Width; 1978using (Bitmap temporaryBitmap = new Bitmap(designerTheme.Size.Width, designerTheme.Size.Height, PixelFormat.Format32bppArgb)) 3042smartTagRectangle.X = rectangle.Left - margin.Width / 2; 3044smartTagRectangle.Width = imageSize.Width + glyphSize.Width / 2 + 3 * margin.Width; 3095imageRectangle.X += margin.Width / 2; 3102dropDownRectangle.X += imageSize.Width + 3 * margin.Width / 2; 3104dropDownRectangle.Width = glyphSize.Width / 2;
AuthoringOM\Design\ActivityPreviewDesigner.cs (33)
160this.previewStrip.Location = new Point(this.previewStrip.Location.X + moveDelta.Width, this.previewStrip.Location.Y + moveDelta.Height); 164this.previewWindow.Location = new Point(this.previewWindow.Location.X + moveDelta.Width, this.previewWindow.Location.Y + moveDelta.Height); 165this.separatorLine[0] = new Point(this.separatorLine[0].X + moveDelta.Width, this.separatorLine[0].Y + moveDelta.Height); 166this.separatorLine[1] = new Point(this.separatorLine[1].X + moveDelta.Width, this.separatorLine[1].Y + moveDelta.Height); 172PreviewedDesigner.Location = new Point(Location.X + (Size.Width - PreviewedDesigner.Size.Width) / 2, Location.Y + headerHeight + 2 * WorkflowTheme.CurrentTheme.AmbientTheme.Margin.Height); 572this.previewStrip.Location = new Point(bounds.Left + bounds.Width / 2 - this.previewStrip.Size.Width / 2, Location.Y + TitleHeight + e.AmbientTheme.Margin.Height); 581this.previewWindow.Location = new Point(bounds.Left + bounds.Width / 2 - this.previewWindow.Size.Width / 2, previewStripRectangle.Bottom + 3 * e.AmbientTheme.Margin.Height); 583this.separatorLine[0].X = bounds.Left + e.AmbientTheme.Margin.Width; 587this.separatorLine[1].X = bounds.Right - e.AmbientTheme.Margin.Width; 595PreviewedDesigner.Location = new Point(Location.X + (Size.Width - PreviewedDesigner.Size.Width) / 2, Location.Y + headerHeight + 2 * e.AmbientTheme.Margin.Height); 613containerSize.Width = Math.Max(containerSize.Width, this.previewStrip.Size.Width); 620this.previewWindow.OnLayoutSize(e.Graphics, containerSize.Width); 622containerSize.Width = Math.Max(containerSize.Width, this.previewWindow.Size.Width); 623containerSize.Width += 2 * e.AmbientTheme.Margin.Width; 631containerSize.Width = Math.Max(containerSize.Width, size.Width); 632containerSize.Width += 3 * e.AmbientTheme.Margin.Width; 633containerSize.Width += 2 * e.AmbientTheme.SelectionSize.Width; 637containerSize.Width = Math.Max(containerSize.Width, MinimumSize.Width); 650Size margins = new Size(2 * e.AmbientTheme.Margin.Width + 2 * e.AmbientTheme.SelectionSize.Width, 2 * e.AmbientTheme.Margin.Height + 2 * e.AmbientTheme.SelectionSize.Height); 651PreviewedDesigner.Size = new Size(containerSize.Width - margins.Width, containerSize.Height - (TitleHeight + this.previewStrip.Size.Height + margins.Height)); 799dropConnector.Width = (dropConnector.Width > ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0)) ? ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0) : dropConnector.Width; 988configErrorSize.Width = configErrorSize.Width * 3 / 4; 991Point configErrorLocation = new Point(rectangle.Right - configErrorSize.Width / 2, rectangle.Top - configErrorSize.Height / 2); 998rectangle.Inflate(ambientTheme.Margin.Width / 2, ambientTheme.Margin.Height / 2);
AuthoringOM\Design\CommandSet.cs (2)
289int newZoom = (int)(100.0f / this.workflowView.ActiveLayout.Scaling * Math.Min((float)this.workflowView.ViewPortSize.Width / (float)this.workflowView.ActiveLayout.Extent.Width, (float)this.workflowView.ViewPortSize.Height / (float)this.workflowView.ActiveLayout.Extent.Height));
AuthoringOM\Design\CompositeActivityDesigner.cs (21)
216activityDesigner.Location = new Point(activityDesigner.Location.X + moveDelta.Width, activityDesigner.Location.Y + moveDelta.Height); 244expandButtonRectangle.X += (bounds.Width - ((3 * designerTheme.ExpandButtonSize.Width / 2) + anchorSize.Width)) / 2; 303if (textSize.Width > 0) 305imageRectangle.X += (bounds.Width - imageSize.Width) / 2; 309imageRectangle.X += (bounds.Width - (imageSize.Width + 3 * expandButtonSize.Width / 2)) / 2; 310imageRectangle.X += 3 * expandButtonSize.Width / 2; 336int maxAvailableWidth = bounds.Width - (2 * margin.Width + 3 * expandButtonSize.Width / 2); 340requestedLineSize.Width += ((requestedLineSize.Width % Text.Length) > 0) ? 1 : 0; 344textSize.Width = Math.Min(maxAvailableWidth, this.actualTextSize.Width); 345textSize.Width = Math.Max(1, Math.Max(textSize.Width, requestedLineSize.Width)); 348int textLines = this.actualTextSize.Width / textSize.Width; 349textLines += ((this.actualTextSize.Width % textSize.Width) > 0) ? 1 : 0; 355textRectangle.X += (bounds.Width - (3 * expandButtonSize.Width / 2 + textSize.Width)) / 2; 356textRectangle.X += 3 * expandButtonSize.Width / 2;
AuthoringOM\Design\Connector.cs (18)
137Rectangle enclosingBounds = new Rectangle(new Point(location.X - size.Width / 2, location.Y - size.Height / 2), size); 186defaultSize.Width += defaultSize.Width / 2; 189defaultSize = new Size(Math.Max(defaultSize.Width, (int)this.associatedDesigner.DesignerTheme.ForegroundPen.Width * 4), Math.Max(defaultSize.Height, (int)this.associatedDesigner.DesignerTheme.ForegroundPen.Width * 4)); 346this.segments[i] = new Point(this.segments[i].X + size.Width, this.segments[i].Y + size.Height); 443Size arrowCapSize = new Size(theme.ConnectorSize.Width / 5, theme.ConnectorSize.Height / 5); 457Size arrowCapSize = new Size(theme.ConnectorSize.Width / 5, theme.ConnectorSize.Height / 5); 485Size arrowCapSize = new Size(theme.ConnectorSize.Width / 5, theme.ConnectorSize.Height / 5); 518Rectangle bounds = new Rectangle(point.X - size.Width / 2, point.Y - size.Height / 2, size.Width, size.Height); 1496return new Rectangle(this.point.X - controlPointSize.Width / 2, this.point.Y - controlPointSize.Height / 2, controlPointSize.Width, controlPointSize.Height); 1530Point[] routedPoints = ConnectorRouter.Route(sourcePoint, targetPoint, new Size(2 * ambientTheme.Margin.Width, 2 * ambientTheme.Margin.Height), rootDesigner.Bounds, rectanglesToExclude.ToArray(), linesToExclude.ToArray(), pointsToExclude.ToArray()); 1826int width = Math.Max(margin.Width / 2, 1), height = Math.Max(margin.Height / 2, 1); 2128r2.X -= margin.Width; 2174r4.X += margin.Width; 2253escapePoint = new Point(p.X + direction.X * margin.Width, Z.Y); 2474int steps = Math.Max(Math.Abs(direction.X / margin.Width), Math.Abs(direction.Y / margin.Height)); //one of the values will be null 2480Point k = new Point(a1.X + i * margin.Width * direction.X, a1.Y + i * margin.Height * direction.Y);
AuthoringOM\Design\DesignerHelpers.cs (67)
76textSize = graphics.MeasureString(text, font, new SizeF(maxSize.Width, maxSize.Height), format); 203rectangle.Width = Math.Min(size.Width, destination.Width); 242selectionRect.Inflate(selectionSize.Width, selectionSize.Height); 244selectionRect.Inflate(-selectionSize.Width / 2, -selectionSize.Height / 2); 247selectionRect.Inflate(selectionSize.Width / 2, selectionSize.Height / 2); 332gridStart.X = viewableRectangle.X - (viewableRectangle.X % ambientTheme.GridSize.Width); 335for (int gridCoOrdX = gridStart.X; gridCoOrdX <= viewableRectangle.Right; gridCoOrdX += Math.Max(ambientTheme.GridSize.Width, 1)) 341if (((gridCoOrdX + ambientTheme.GridSize.Width / 2) >= viewableRectangle.Left && (gridCoOrdX + ambientTheme.GridSize.Width / 2) <= viewableRectangle.Right) && 343graphics.FillRectangle(ambientTheme.MinorGridBrush, new Rectangle(new Point(gridCoOrdX + ambientTheme.GridSize.Width / 2, gridCoOrdY + ambientTheme.GridSize.Height / 2), new Size(1, 1))); 449shadowRectangle.Offset(offset.Width, offset.Height); 515bounds.Inflate(-margin.Width, -margin.Height); 546bounds.X -= inflate.Width; 547bounds.Width += inflate.Width; 551bounds.Width += inflate.Width; 600int capSize = (startSegment[0].Y == startSegment[1].Y) ? connectorCapSize.Width : connectorCapSize.Height; 602capSize = Math.Min(Math.Min(capSize, maxCapSize.Width), maxCapSize.Height); 630int capSize = (endSegment[0].Y == endSegment[1].Y) ? connectorCapSize.Width : connectorCapSize.Height; 632capSize = Math.Min(Math.Min(capSize, maxCapSize.Width), maxCapSize.Height); 705lineCapPath.AddLine(capSize.Width / 2, -capSize.Height, 0, 0); 706lineCapPath.AddLine(0, 0, -capSize.Width / 2, -capSize.Height); 707lineCapPath.AddLine(-capSize.Width / 2, -capSize.Height, 0, -capSize.Height + arcRadius); 708lineCapPath.AddLine(0, -capSize.Height + arcRadius, capSize.Width / 2, -capSize.Height); 714lineCapPath.AddLine(0, -capSize.Height, capSize.Width / 2, -capSize.Height / 2); 715lineCapPath.AddLine(capSize.Width / 2, -capSize.Height / 2, 0, 0); 716lineCapPath.AddLine(0, 0, -capSize.Width / 2, -capSize.Height / 2); 717lineCapPath.AddLine(-capSize.Width / 2, -capSize.Height / 2, 0, -capSize.Height); 722lineCapPath.AddEllipse(new Rectangle(-capSize.Width / 2, -capSize.Height, capSize.Width, capSize.Height)); 727lineCapPath.AddRectangle(new Rectangle(-capSize.Width / 2, -capSize.Height, capSize.Width, capSize.Height)); 733lineCapPath.AddPath(GetRoundedRectanglePath(new Rectangle(-capSize.Width / 2, -capSize.Height, capSize.Width, capSize.Height), arcRadius), true); 784scrollIndicatorPath.AddLine(bounds.Left + (bounds.Width - arrowSize.Width) / 2, bounds.Top, bounds.Left + (bounds.Width - arrowSize.Width) / 2, bounds.Top + arrowSize.Height); 785scrollIndicatorPath.AddLine(bounds.Left + (bounds.Width - arrowSize.Width) / 2, bounds.Top + arrowSize.Height, bounds.Left + (bounds.Width - arrowSize.Width) / 2 + arrowSize.Width, bounds.Top + midPoint); 786scrollIndicatorPath.AddLine(bounds.Left + (bounds.Width - arrowSize.Width) / 2 + arrowSize.Width, bounds.Top + midPoint, bounds.Left + (bounds.Width - arrowSize.Width) / 2, bounds.Top); 790scrollIndicatorPath.AddLine(bounds.Left + (bounds.Width - arrowSize.Width) / 2, bounds.Top + midPoint, bounds.Left + (bounds.Width - arrowSize.Width) / 2 + arrowSize.Width, bounds.Top + arrowSize.Height); 791scrollIndicatorPath.AddLine(bounds.Left + (bounds.Width - arrowSize.Width) / 2 + arrowSize.Width, bounds.Top + arrowSize.Height, bounds.Left + (bounds.Width - arrowSize.Width) / 2 + arrowSize.Width, bounds.Top); 792scrollIndicatorPath.AddLine(bounds.Left + (bounds.Width - arrowSize.Width) / 2 + arrowSize.Width, bounds.Top, bounds.Left + (bounds.Width - arrowSize.Width) / 2, bounds.Top + midPoint); 803scrollIndicatorPath.AddLine(bounds.Left, bounds.Top + (bounds.Height - arrowSize.Height) / 2, bounds.Left + arrowSize.Width, bounds.Top + (bounds.Height - arrowSize.Height) / 2); 804scrollIndicatorPath.AddLine(bounds.Left + arrowSize.Width, bounds.Top + (bounds.Height - arrowSize.Height) / 2, bounds.Left + midPoint, bounds.Top + (bounds.Height - arrowSize.Height) / 2 + arrowSize.Height); 809scrollIndicatorPath.AddLine(bounds.Left + midPoint, bounds.Top + (bounds.Height - arrowSize.Height) / 2, bounds.Left + arrowSize.Width, bounds.Top + (bounds.Height - arrowSize.Height) / 2 + arrowSize.Height); 810scrollIndicatorPath.AddLine(bounds.Left + arrowSize.Width, bounds.Top + (bounds.Height - arrowSize.Height) / 2 + arrowSize.Height, bounds.Left, bounds.Top + (bounds.Height - arrowSize.Height) / 2 + arrowSize.Height); 1028gridStart.X = viewableRectangle.X - (viewableRectangle.X % gridUnit.Width); 1034for (int gridCoOrd = gridStart.X; gridCoOrd <= viewableRectangle.Right; gridCoOrd += Math.Max(gridUnit.Width, 1)) 1045if (showMinorGrid && (gridCoOrd + gridUnit.Width / 2) >= viewableRectangle.Left && (gridCoOrd + gridUnit.Width / 2) <= viewableRectangle.Right) 1051if (!NativeMethods.MoveToEx(this.hdc, gridCoOrd + gridUnit.Width / 2, viewableRectangle.Top + 1, null)) 1054if (!NativeMethods.LineTo(this.hdc, gridCoOrd + gridUnit.Width / 2, viewableRectangle.Bottom - 1)) 1190location.X = ((location.X / snapSize.Width) * snapSize.Width) + (((location.X % snapSize.Width) > snapSize.Width / 2) ? snapSize.Width : 0); 1908if (distance < hitAreaSize.Width && distance < hitAreaSize.Height)
AuthoringOM\Design\DesignerWidgets.cs (74)
160buttonBounds.Inflate(-base.itemStrip.ItemSize.Width / 6, -base.itemStrip.ItemSize.Height / 4); 162buttonBounds.Inflate(-base.itemStrip.ItemSize.Width / 4, -base.itemStrip.ItemSize.Height / 6); 169buttonBounds.Inflate(inflateSize.Width, inflateSize.Height); 174buttonBounds.Inflate(-inflateSize.Width, -inflateSize.Height); 276this.buttonSize = new Size(itemSize.Width * 2 / 3, itemSize.Height); 278this.buttonSize = new Size(itemSize.Width, itemSize.Height * 2 / 3); 366availableSize = this.bounds.Width - (2 * (2 * this.margin.Width + this.buttonSize.Width)); 367availableSize -= this.margin.Width; 368if (this.margin.Width + this.itemStrip.ItemSize.Width > 0) 369availableSize -= (availableSize % (this.margin.Width + this.itemStrip.ItemSize.Width)); 370this.itemStrip.Size = new Size(Math.Min(availableSize, reqdSize.Width), Math.Min(this.bounds.Height, reqdSize.Height)); 378this.itemStrip.Size = new Size(Math.Min(this.bounds.Width, reqdSize.Width), Math.Min(availableSize, reqdSize.Height)); 480buttonRectangle.X = this.bounds.X + this.margin.Width; 487buttonRectangle.X = this.bounds.X + this.margin.Width + buttonRectangle.Size.Width + this.itemStrip.Size.Width; 489buttonRectangle.X = this.bounds.Right - buttonRectangle.Size.Width; 495buttonRectangle.X = this.bounds.X + this.margin.Width; 715itemRectangle.X = bounds.Left + (itemIndex * this.itemSize.Width) + ((itemIndex + 1) * this.margin.Width); 720itemRectangle.X = bounds.Left + this.margin.Width; 754reqdSize.Width = (this.items.Count * this.itemSize.Width) + ((this.items.Count + 1) * this.margin.Width); 759reqdSize.Width = this.itemSize.Width + 2 * this.margin.Width; 841int totalStripSize = this.bounds.Width - this.margin.Width; 842visibleItemCount = totalStripSize / Math.Max((this.itemSize.Width + this.margin.Width), 1); 1342maxTextSize.Width = Math.Max(Convert.ToInt32(Math.Ceiling(size.Width)), maxTextSize.Width); 1346maxTextSize.Width = Math.Min(maxTextSize.Width, this.maximumTextWidth); 1349this.itemWidth = this.imageRectangle.Width + 2 * this.selectionItemMargin.Width + this.leftTextMargin + maxTextSize.Width + this.rightTextMargin; 1810tabItemSize += this.drawItems[i].TextSize.Width; 1981tabItemSize += this.drawItems[i].TextSize.Width + TabMargin; 2537rectangles[j].X = stripRectangle.Left + (i * (itemSize.Width + itemMargin.Width)); 2539rectangles[j].Size = new Size(itemMargin.Width, itemSize.Height + itemMargin.Height); 2564itemRectangle.X = stripRectangle.Left + (itemIndex * itemSize.Width) + ((itemIndex + 1) * itemMargin.Width); 2659this.bounds.Width = 2 * WorkflowTheme.CurrentTheme.AmbientTheme.Margin.Width; 2660this.bounds.Width += (itemSize.Width * ((designerTheme != null) ? designerTheme.PreviewItemCount : 0)); 2661this.bounds.Width += (itemMargin.Width * (((designerTheme != null) ? designerTheme.PreviewItemCount : 0) + 1)); 2662this.bounds.Width += GetButtonBounds(ScrollButton.Left).Size.Width; 2663this.bounds.Width += GetButtonBounds(ScrollButton.Right).Size.Width; 2711int selectionSize = Math.Max(Math.Min(itemMargin.Width / 4, itemMargin.Height / 2), 1); 2758dropTargets[activeDropTarget].Width = itemMargin.Width; 2831stripRectangle.X = scrollLeftButton.Right + margin.Width; 2833stripRectangle.Width = (scrollRightButton.Left - margin.Width) - (scrollLeftButton.Right + margin.Width); 2846scrollButtonSize.Height = Math.Min(scrollButtonSize.Width, Math.Min(scrollButtonSize.Height, ItemSize.Height)); 2847scrollButtonSize.Width = Math.Min(scrollButtonSize.Width, scrollButtonSize.Height); 2849int startLocation = (scrollButton == ScrollButton.Left) ? this.bounds.X : this.bounds.Right - scrollButtonSize.Width; 2893return new Size(itemSize.Width / 2, itemSize.Height / 4); 3245descRectanglePos.X = this.bounds.Left + this.bounds.Width / 2 - this.previewModeDescRectangle.Width / 2 + this.previewModeButtonRectangle.Width + margin.Width; 3250previewModeBitmapPos.X = descRectanglePos.X - (this.previewModeButtonRectangle.Width + margin.Width); 3260location.X = this.canvasBounds.Left + this.canvasBounds.Width / 2 - PreviewDesigner.Size.Width / 2; 3375this.canvasBounds.Inflate(margin.Width * 2, margin.Height * 2); 3376this.canvasBounds.Size = new Size(Math.Max(this.canvasBounds.Width, designerTheme.PreviewWindowSize.Width), Math.Max(this.canvasBounds.Height, designerTheme.PreviewWindowSize.Height)); 3387this.previewDescTextSize.Width = Math.Min(this.canvasBounds.Size.Width - margin.Width - this.previewModeButtonRectangle.Size.Width, this.previewDescTextSize.Width); 3394totalSize.Width = this.canvasBounds.Width + 2 * margin.Width; 3444descriptionRectangle.Inflate(-margin.Width, -margin.Height); 3459Size maxBitmapSize = new Size(this.canvasBounds.Width - 2 * margin.Width, this.canvasBounds.Height - 2 * margin.Height); 3460double stretchFactor = ((double)previewedActivityImage.Width) / maxBitmapSize.Width; 3474indicatorBounds.Inflate(-margin.Width, -margin.Height); 3482previewDesignerViewPort.Inflate(margin.Width, margin.Height); 3564float stretchFactor = ((float)previewSize.Width) / previewDesignerSize.Width;
AuthoringOM\Design\Dialogs\ThemeConfigurationDialog.cs (7)
545e.Graphics.DrawRectangle(SystemPens.ControlDark, 0, 0, this.themePanel.ClientSize.Width - 1, this.themePanel.ClientSize.Height - 2); 558e.Graphics.DrawLine(framePen, this.designerPreview.Left - margin.Width, this.designerPreview.Top - 1, this.designerPreview.Right + margin.Width, this.designerPreview.Top - 1); 559e.Graphics.DrawLine(framePen, this.designerPreview.Left - margin.Width, this.designerPreview.Bottom + 1, this.designerPreview.Right + margin.Width, this.designerPreview.Bottom + 1); 1218PointF zoom = new PointF((float)size.Width / (float)maxExtent.Width, (float)size.Height / (float)maxExtent.Height);
AuthoringOM\Design\Dialogs\TypeBrowserDialog.cs (1)
809this.helpTextWindow.Size = new Size(this.helpTextHolder.Size.Width - 6, this.helpTextHolder.Size.Height - 6);
AuthoringOM\Design\Dialogs\WorkflowPageSetupDialog.cs (1)
1079if (horizontalMarginsSum < physicalPageSize.Width && verticalMarginsSum < physicalPageSize.Height)
AuthoringOM\Design\FreeFormDesigner.cs (6)
176margin.Width += gridSize.Width / 2; 253minimumSize.Width = Math.Max(minimumSize.Width, workflowView.ViewPortSize.Width - 2 * WorkflowRootLayout.Separator.Width); 262minimumSize.Width = Math.Max(minimumSize.Width, childRectangle.Width); 919designer.Location = new Point(location.X + autoSizeMargin.Width, location.Y + autoSizeMargin.Height);
AuthoringOM\Design\Glyphs\ConfigErrorGlyph.cs (5)
52Point configErrorLocation = new Point(designer.Bounds.Right - configErrorSize.Width - margin.Width / 2, designer.Bounds.Top - configErrorSize.Height + margin.Height); 59bounds.Inflate(ambientTheme.Margin.Width / 2, ambientTheme.Margin.Height / 2); 86activatedBounds.X += bounds.Width + ambientTheme.Margin.Width; 87activatedBounds.Width -= (bounds.Width + 2 * ambientTheme.Margin.Width);
AuthoringOM\Design\Glyphs\ConnectorDragDropGlyph.cs (1)
21this.glyphPoint = new Point(connectorCenter.X - ambientTheme.DropIndicatorSize.Width / 2, connectorCenter.Y - ambientTheme.DropIndicatorSize.Height / 2);
AuthoringOM\Design\Glyphs\SelectionGlyph.cs (11)
21rectangle.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.SelectionSize.Width / 2, WorkflowTheme.CurrentTheme.AmbientTheme.SelectionSize.Height / 2); 43Size grabHandleSize = new Size(selectionSize.Width, selectionSize.Height); 45selectionRect.Inflate(selectionSize.Width, selectionSize.Height); 56grabHandles[1] = new Rectangle(new Point(selectionRect.Left + (selectionRect.Width - grabHandleSize.Width) / 2, selectionRect.Top), grabHandleSize); 57grabHandles[2] = new Rectangle(selectionRect.Right - grabHandleSize.Width, selectionRect.Top, grabHandleSize.Width, grabHandleSize.Height); 58grabHandles[3] = new Rectangle(new Point(selectionRect.Right - grabHandleSize.Width, selectionRect.Top + (selectionRect.Height - grabHandleSize.Height) / 2), grabHandleSize); 59grabHandles[4] = new Rectangle(selectionRect.Right - grabHandleSize.Width, selectionRect.Bottom - grabHandleSize.Height, grabHandleSize.Width, grabHandleSize.Height); 60grabHandles[5] = new Rectangle(new Point(selectionRect.Left + (selectionRect.Width - grabHandleSize.Width) / 2, selectionRect.Bottom - grabHandleSize.Height), grabHandleSize); 61grabHandles[6] = new Rectangle(selectionRect.Left, selectionRect.Bottom - grabHandleSize.Height, grabHandleSize.Width, grabHandleSize.Height);
AuthoringOM\Design\MessageFilters\AutoScrollExpandMessageFilter.cs (9)
143indicatorSize.Width += 2 * ambientTheme.Margin.Width; 145return (viewPortSize.Width > 2 * indicatorSize.Width && viewPortSize.Height > 2 * indicatorSize.Height); 160scrollIndicatorRectangles[0].X = indicatorMargins.Width; 165scrollIndicatorRectangles[1].X = clientRectangle.Right - indicatorMargins.Width - scrollIndicatorSize.Width; 170scrollIndicatorRectangles[2].X = (clientRectangle.Width - scrollIndicatorSize.Width) / 2; 175scrollIndicatorRectangles[3].X = (clientRectangle.Width - scrollIndicatorSize.Width) / 2; 216if (scrollPosition.X < parentView.HScrollBar.Maximum - viewPortSize.Width)
AuthoringOM\Design\MessageFilters\ConnectionManager.cs (1)
125(Math.Abs(this.initialDragPoint.Value.X - logicalPoint.X) > SystemInformation.DragSize.Width ||
AuthoringOM\Design\MessageFilters\DragDropManager.cs (8)
117else if (parentView.RootDesigner != null && this.dragStarted && (eventArgs.Button & MouseButtons.Left) > 0 && (Math.Abs(this.dragInitiationPoint.X - logicalPoint.X) > SystemInformation.DragSize.Width || Math.Abs(this.dragInitiationPoint.Y - logicalPoint.Y) > SystemInformation.DragSize.Height)) 272this.dragImagePointInClientCoOrd = new Point(clientPoint.X + SystemInformation.CursorSize.Width / 4, clientPoint.Y + SystemInformation.CursorSize.Height / 4); 306this.dragImagePointInClientCoOrd = new Point(midPointInClientCoOrd.X - dragImageIconSize.Width / 2, midPointInClientCoOrd.Y - dragImageIconSize.Height / 2); 332this.dragImagePointInClientCoOrd = new Point(clientPoint.X + SystemInformation.CursorSize.Width / 4, clientPoint.Y + SystemInformation.CursorSize.Height / 4); 383this.dragImagePointInClientCoOrd = new Point(midPointInClientCoOrd.X - dragImageIconSize.Width / 2, midPointInClientCoOrd.Y - dragImageIconSize.Height / 2); 674Rectangle descriptionRectangle = (description.Length > 0) ? new Rectangle(Point.Empty, new Size(AmbientTheme.DragImageTextSize.Width, parentView.Font.Height + 2)) : Rectangle.Empty; 676descriptionRectangle.Offset(imageRectangle.Width + AmbientTheme.DragImageMargins.Width, 0); 679draggedImage = new Bitmap(draggedImageSize.Width, draggedImageSize.Height, PixelFormat.Format32bppArgb);
AuthoringOM\Design\MessageFilters\DragSelectionMessageFilter.cs (1)
66(Math.Abs(this.startDrag.X - logicalPoint.X) > (int)(dragMultiply * (float)SystemInformation.DragSize.Width) || Math.Abs(this.startDrag.Y - logicalPoint.Y) > (int)(dragMultiply * (float)SystemInformation.DragSize.Height)))
AuthoringOM\Design\MessageFilters\DynamicActionMessageFilter.cs (7)
324bounds.Inflate(-action.DockMargin.Width, -action.DockMargin.Height); 570size.Width = (2 * borderSize.Width) + (buttonCount * this.buttonSize.Width) + ((buttonCount + 1) * this.margin.Width); 582rectangle.X = this.borderSize.Width + (buttonIndex * this.buttonSize.Width) + ((buttonIndex + 1) * this.margin.Width);
AuthoringOM\Design\MessageFilters\FreeFormDragDropManager.cs (3)
170ActivityDesignerPaint.DrawImage(eventArgs.Graphics, this.draggedDesignerImages[i], new Rectangle(new Point(locations[i].X - 2 * ambientTheme.Margin.Width, locations[i].Y - 2 * ambientTheme.Margin.Height), imageSize), new Rectangle(Point.Empty, imageSize), DesignerContentAlignment.Fill, 0.4f, false); 233rectangle.Inflate(2 * ambientTheme.Margin.Width, 2 * ambientTheme.Margin.Height); 256location = new Point(designerToMove.Location.X + delta.Width, designerToMove.Location.Y + delta.Height);
AuthoringOM\Design\MessageFilters\PanningMessageFilter.cs (1)
76parentView.ScrollPosition = new Point(parentView.ScrollPosition.X - panSize.Width, parentView.ScrollPosition.Y - panSize.Height);
AuthoringOM\Design\MessageFilters\ResizingMessageFilter.cs (6)
195if (Math.Floor(DesignerGeometryHelper.DistanceFromPointToLineSegment(point, new Point[] { new Point(designerBounds.Left, designerBounds.Top), new Point(designerBounds.Left, designerBounds.Bottom) })) <= selectionSize.Width + 1) 199if (Math.Floor(DesignerGeometryHelper.DistanceFromPointToLineSegment(point, new Point[] { new Point(designerBounds.Right, designerBounds.Top), new Point(designerBounds.Right, designerBounds.Bottom) })) <= selectionSize.Width + 1) 279clipBounds.Inflate(-2 * selectionSize.Width, -2 * selectionSize.Height); 291int delta = (designerBounds.Width < designerToSize.MinimumSize.Width) ? designerBounds.Width - designerToSize.MinimumSize.Width : 0; 314designerBounds.Width = Math.Max(designerBounds.Width, designerToSize.MinimumSize.Width);
AuthoringOM\Design\MessageFilters\ZoomingMessageFilter.cs (2)
119Point center = new Point((this.currentState == ZoomState.In) ? eventArgs.X : parentView.ViewPortSize.Width / 2, (this.currentState == ZoomState.In) ? eventArgs.Y : parentView.ViewPortSize.Height / 2); 171int zoom = (int)(Math.Min((float)parentView.ViewPortSize.Width / (float)dragRectangle.Width, (float)parentView.ViewPortSize.Height / (float)dragRectangle.Height) * 100.0f);
AuthoringOM\Design\ParallelActivityDesigner.cs (20)
227width += e.AmbientTheme.SelectionSize.Width; 228width += compositeDesignerTheme.ConnectorSize.Width; 231width += designerSize.Width; 232width += e.AmbientTheme.SelectionSize.Width; 252containerSize.Width += e.AmbientTheme.SelectionSize.Width; 253containerSize.Width += compositeDesignerTheme.ConnectorSize.Width; 254containerSize.Width += childSize.Width; 255containerSize.Width += e.AmbientTheme.SelectionSize.Width; 258containerSize.Width += (ContainedDesigners.Count > 0) ? compositeDesignerTheme.ConnectorSize.Width : 0; 262activityDesigner.Size = new Size(activityDesigner.Size.Width, containerSize.Height); 268size.Width = Math.Max(size.Width, containerSize.Width); 290dropTargets[0].Size = new Size(((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0), firstDesigner.Size.Height); 300dropTargets[i + 1].Location = new Point(designerBounds1.Right + (designerBounds2.Left - designerBounds1.Right) / 2 - ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0) / 2, designerBounds1.Top); 301dropTargets[i + 1].Size = new Size(((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0), designerBounds1.Height); 306dropTargets[containedDesigners.Count].Location = new Point(bounds.Right - ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0), lastDesigner.Location.Y); 307dropTargets[containedDesigners.Count].Size = new Size(((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0), lastDesigner.Size.Height); 311dropTargets[0].Location = new Point(Location.X + (Size.Width - ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0)) / 2, TextRectangle.Bottom); 312dropTargets[0].Size = new Size(((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0), Location.Y + Size.Height - dropTargets[0].Location.Y);
AuthoringOM\Design\SequentialActivityDesigner.cs (22)
163helpTextRectangle.X = connectors[0].Left + connectors[0].Width / 2 - this.helpTextSize.Width / 2; 213connectorBounds[0].Location = new Point(containerStartConnection.X - ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0) / 2, containerStartConnection.Y); 214connectorBounds[0].Size = new Size(((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0), startDesignerConnections[0].Y - containerStartConnection.Y); 226connectorBounds[i + 1].Location = new Point(designerFromConnections[designerFromPointCount - 1].X - ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0) / 2, designerFromConnections[designerFromPointCount - 1].Y); 227connectorBounds[i + 1].Size = new Size(((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0), designerToConnections[0].Y - designerFromConnections[designerFromPointCount - 1].Y); 243connectorBounds[connectorCount - 1].Location = new Point(endDesignerConnections[endDesignerConnections.Count - 1].X - ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0) / 2, endDesignerConnections[endDesignerConnections.Count - 1].Y); 244connectorBounds[connectorCount - 1].Size = new Size(((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0), containerEndConnection.Y - endDesignerConnections[endDesignerConnections.Count - 1].Y); 249connectorBounds[0].Location = new Point(containerStartConnection.X - ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0) / 2, containerStartConnection.Y); 250connectorBounds[0].Size = new Size(((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0), containerEndConnection.Y - containerStartConnection.Y); 463activityDesigner.Location = new Point(location.X - (designerSize.Width / 2), location.Y + height); 485containerSize.Width = Math.Max(containerSize.Width, childSize.Width); 493containerSize.Width = Math.Max(helpTextRectangle.Width, containerSize.Width); 498containerSize.Width = Math.Max(containerSize.Width, compositeDesignerTheme.Size.Width); 499containerSize.Width += 3 * e.AmbientTheme.Margin.Width; 500containerSize.Width += 2 * e.AmbientTheme.SelectionSize.Width; 528glyphLocation = new Point(connectors[i].Location.X + connectors[i].Size.Width / 2 + 1, connectors[i].Location.Y + connectors[i].Size.Height / 2); 567grabHandles[0] = new Rectangle(bounds.X + bounds.Width / 2 - ambientTheme.SelectionSize.Width / 2, bounds.Y, ambientTheme.SelectionSize.Width, ambientTheme.SelectionSize.Height); 568grabHandles[1] = new Rectangle(bounds.X + bounds.Width / 2 - ambientTheme.SelectionSize.Width / 2, bounds.Bottom - ambientTheme.SelectionSize.Height, ambientTheme.SelectionSize.Width, ambientTheme.SelectionSize.Height);
AuthoringOM\Design\SequentialWorkflowHeaderFooter.cs (2)
111bounds.Width = Math.Max(imageBounds.Width, textBounds.Width) + 2 * margin.Width; 140bounds.X = designerBounds.Left + designerBounds.Width / 2 - this.textSize.Width / 2;
AuthoringOM\Design\SequentialWorkflowRootDesigner.cs (8)
94minimumSize.Width = Math.Max(minimumSize.Width, SequentialWorkflowRootDesigner.MinSize.Width); 95minimumSize.Height = Math.Max(minimumSize.Width, SequentialWorkflowRootDesigner.MinSize.Height); 98minimumSize.Width = Math.Max(minimumSize.Width, ParentView.ViewPortSize.Width - 2 * WorkflowRootLayout.Separator.Width); 304bounds.Inflate(-e.AmbientTheme.Margin.Width, -e.AmbientTheme.Margin.Height); 401headerBarRectangle.Width = AssociatedDesigner.Size.Width;
AuthoringOM\Design\StructuredCompositeActivityDesigner.cs (8)
167minimumSize.Width = Math.Max(minimumSize.Width, 160); 478arrowCapSize = new Size(compositeDesignerTheme.ConnectorSize.Width / 3, compositeDesignerTheme.ConnectorSize.Height / 3); 544location.X += (Size.Width - activeDesigner.Size.Width) / 2; 564containerSize.Width = Math.Max(containerSize.Width, activeDesigner.Size.Width); 567containerSize.Width += 2 * e.AmbientTheme.SelectionSize.Width; 568containerSize.Width += 3 * e.AmbientTheme.Margin.Width;
AuthoringOM\Design\WorkflowLayouts.cs (52)
86Size totalSize = new Size(rootDesignerSize.Width + DefaultWorkflowLayout.Separator.Width * 2, rootDesignerSize.Height + DefaultWorkflowLayout.Separator.Height * 2); 88return new Size(Math.Max(totalSize.Width, clientSize.Width), Math.Max(totalSize.Height, clientSize.Height)); 162transformationMatrix.Translate(-logicalViewPortOrigin[0].X + viewPortData.ShadowDepth.Width, -logicalViewPortOrigin[0].Y + viewPortData.ShadowDepth.Height, MatrixOrder.Append); 217Size totalSize = new Size(rootDesignerSize.Width + DefaultWorkflowLayout.Separator.Width * 2, rootDesignerSize.Height + DefaultWorkflowLayout.Separator.Height * 2); 220clientSize.Width = (int)(clientSize.Width / ((float)this.parentView.Zoom / 100.0f)); 223return new Size(Math.Max(totalSize.Width, clientSize.Width), Math.Max(totalSize.Height, clientSize.Height)); 250transformationMatrix.Translate(-logicalViewPortOrigin[0].X + viewPortData.ShadowDepth.Width, -logicalViewPortOrigin[0].Y + viewPortData.ShadowDepth.Height, MatrixOrder.Append); 259rootBounds.Inflate(ActivityRootLayout.Separator.Width / 2, ActivityRootLayout.Separator.Height / 2); 285logicalRectangle.X -= offSet.Width; 293logicalRectangle.X += offSet.Width; 301logicalPoint.Offset(-offSet.Width, -offSet.Height); 308logicalPoint.Offset(offSet.Width, offSet.Height); 321totalSize.Width = Math.Max(totalSize.Width, layoutExtent.Width); 323return new Size(Math.Max(0, (totalSize.Width - layoutExtent.Width) / 2), Math.Max(0, (totalSize.Height - layoutExtent.Height) / 2)); 372maxSize.Width = (this.rowColumns.Width * this.pageSize.Width) + ((this.rowColumns.Width + 1) * (PageSeparator.Width)); 383Size printableAreaPerPage = new Size(this.pageSize.Width - (PageMargins.Left + PageMargins.Right), this.pageSize.Height - (PageMargins.Top + PageMargins.Bottom)); 384Size totalPrintableArea = new Size(this.rowColumns.Width * printableAreaPerPage.Width, this.rowColumns.Height * printableAreaPerPage.Height); 389alignment.X = (totalPrintableArea.Width - rootDesignerSize.Width) / 2; 390alignment.X = Math.Max(alignment.X, selectionSize.Width + selectionSize.Width / 2); 434insersectedLogicalViewPort.Width -= deltaSize.Width; 469insersectedPhysicalViewPort.Width -= deltaSize.Width; 729rootDesignerSize.Width += 3 * selectionSize.Width; 740Size printableArea = new Size(paperSize.Width - (margins.Left + margins.Right), paperSize.Height - (margins.Top + margins.Bottom)); 741printableArea.Width = Math.Max(printableArea.Width, 1); 745((float)this.printDocument.PageSetupData.PagesWide * (float)printableArea.Width / (float)rootDesignerSize.Width), 756this.pageSize.Width = Convert.ToInt32(Math.Ceiling(((float)this.pageSize.Width) / this.scaling)); 766PageSeparator = new Size(Convert.ToInt32(Math.Ceiling(((float)PageSeparator.Width) / this.scaling)), Convert.ToInt32(Math.Ceiling(((float)PageSeparator.Height) / this.scaling))); 781Size viewablePageSize = new Size(this.pageSize.Width - (PageMargins.Left + PageMargins.Right), this.pageSize.Height - (PageMargins.Top + PageMargins.Bottom)); 782viewablePageSize.Width = Math.Max(viewablePageSize.Width, 1); 787this.rowColumns.Width = rootDesignerSize.Width / viewablePageSize.Width; 788this.rowColumns.Width += ((rootDesignerSize.Width % viewablePageSize.Width) > 1) ? 1 : 0; 789this.rowColumns.Width = Math.Max(1, this.rowColumns.Width); 802for (int column = 0; column < this.rowColumns.Width; column++) 805pageLocation.X = (column * this.pageSize.Width) + ((column + 1) * PageSeparator.Width); 812Rectangle logicalBounds = new Rectangle(column * viewablePageSize.Width, row * viewablePageSize.Height, viewablePageSize.Width, viewablePageSize.Height);
AuthoringOM\Design\WorkflowPrinting.cs (17)
126Size printableArea = new Size(printPageArg.PageBounds.Size.Width - (margins.Left + margins.Right), printPageArg.PageBounds.Size.Height - (margins.Top + margins.Bottom)); 127Rectangle boundingRectangle = new Rectangle(margins.Left, margins.Top, printableArea.Width, printableArea.Height); 148Point pageOffset = new Point(this.currentPrintablePage.X * printableArea.Width - this.workflowAlignment.X, this.currentPrintablePage.Y * printableArea.Height - this.workflowAlignment.Y); 154viewPortSize.Width = Convert.ToInt32(Math.Ceiling((float)printableArea.Width / this.scaling)); 161Rectangle viewPort = new Rectangle(this.currentPrintablePage.X * viewPortSize.Width - scaledAlignment.X, this.currentPrintablePage.Y * viewPortSize.Height - scaledAlignment.Y, viewPortSize.Width, viewPortSize.Height); 317rootDesignerSize.Width += 3 * selectionSize.Width; 326Size printableArea = new Size(paperSize.Width - (margins.Left + margins.Right), paperSize.Height - (margins.Top + margins.Bottom)); 327printableArea.Width = Math.Max(printableArea.Width, 1); 337float xScaling = (float)this.pageSetupData.PagesWide * (float)printableArea.Width / (float)rootDesignerSize.Width; 346this.totalPrintablePages.X = Convert.ToInt32(Math.Ceiling((this.scaling * (float)rootDesignerSize.Width) / (float)printableArea.Width)); 355this.workflowAlignment.X = (int)(((float)this.totalPrintablePages.X * (float)printableArea.Width / this.scaling - (float)rootDesignerSize.Width) / 2.0f * this.scaling); 360this.workflowAlignment.X = Math.Max(this.workflowAlignment.X, selectionSize.Width + selectionSize.Width / 2);
AuthoringOM\Design\WorkflowView.cs (23)
449viewPortSize.Width = Math.Max(0, viewPortSize.Width - VScrollBar.Width); 943if (HScrollBar.Maximum > ViewPortSize.Width || VScrollBar.Maximum > ViewPortSize.Height) 945int newZoom = (int)(100.0f / ActiveLayout.Scaling * Math.Min((float)ViewPortSize.Width / (float)ActiveLayout.Extent.Width, (float)ViewPortSize.Height / (float)ActiveLayout.Extent.Height)); 1034this.viewPortBitmap = new Bitmap(Math.Max(1, ViewPortSize.Width), Math.Max(1, ViewPortSize.Height), e.Graphics); 1535viewPortData.LogicalViewPort = new Rectangle(Point.Empty, new Size(rootDesigner.Bounds.Width + 2 * DefaultWorkflowLayout.Separator.Width, rootDesigner.Bounds.Height + 2 * DefaultWorkflowLayout.Separator.Height)); 1584transformationMatrix.Translate(-logicalViewPortOrigin[0].X + viewPortData.ShadowDepth.Width, -logicalViewPortOrigin[0].Y + viewPortData.ShadowDepth.Height, MatrixOrder.Append); 1660viewPortGraphics.FillRectangle(shadowDepthBrush, new Rectangle(Point.Empty, new Size(memoryBitmap.Size.Width - viewPortData.ShadowDepth.Width - 1, memoryBitmap.Size.Height - viewPortData.ShadowDepth.Height - 1))); 1668viewPortGraphics.DrawImage(temporaryBitmap, new Rectangle(-viewPortData.ShadowDepth.Width, -viewPortData.ShadowDepth.Height, memoryBitmap.Width, memoryBitmap.Height), 0, 0, memoryBitmap.Width, memoryBitmap.Height, GraphicsUnit.Pixel, transparentColorKey); 1762ScrollPosition = new Point(scrollPosition.X + scrollDelta.Width, scrollPosition.Y + scrollDelta.Height); 1793if (ViewPortSize.Width < 0 || ViewPortSize.Height < 0) 1798Size largeChangeSize = new Size(Math.Min(maximumScrollSize.Width, currentSize.Width), Math.Min(maximumScrollSize.Height, currentSize.Height)); 1800if (hScrollBar.Maximum != maximumScrollSize.Width) 1801hScrollBar.Maximum = maximumScrollSize.Width; 1805if (hScrollBar.LargeChange != largeChangeSize.Width) 1807hScrollBar.SmallChange = largeChangeSize.Width / 15; 1808hScrollBar.LargeChange = largeChangeSize.Width + 1; 1816int xMaxScrollPos = maximumScrollSize.Width - hScrollBar.LargeChange; 1830hScrollBar.Visible = (hScrollBar.Maximum > currentSize.Width); 1863if (HScrollBar.Maximum > ViewPortSize.Width || VScrollBar.Maximum > ViewPortSize.Height) 1891if (HScrollBar.Maximum > ViewPortSize.Width || VScrollBar.Maximum > ViewPortSize.Height)
System.WorkflowServices (9)
System\Workflow\Activities\Design\GradientPanel.cs (2)
78frameRect = new Rectangle(6, 0, this.Size.Width - 14, this.Size.Height - 8); 82frameRect = new Rectangle(0, 0, this.Size.Width - 1, this.Size.Height - 1);
System\Workflow\Activities\Design\RichListBox.cs (1)
245listItemBitmapCache.Add(viewType.Name, new Bitmap(listItemRenderer.Size.Width, listItemRenderer.Size.Height));
System\Workflow\Activities\SendActivityDesigner.cs (2)
136Rectangle outgoingArrowRect = new Rectangle(this.Location.X + this.Size.Width - 24, this.Location.Y + 10, 24, 24); 137Rectangle incomingArrowRect = new Rectangle(this.Location.X + this.Size.Width, this.Location.Y + this.Size.Height - 35, -24, 24);
System\Workflow\ComponentModel\Design\ActivityDesignerHighlighter.cs (4)
105if (scrollPosition.X > viewSize.Width / 2) 107scrollPosition.X -= viewSize.Width / 2; 127if (scrollPosition.X > viewSize.Width / 2) 129scrollPosition.X -= viewSize.Width / 2;