431 writes to Width
System.Drawing (3)
commonui\System\Drawing\Rectangle.cs (3)
118this.Width = value.Width; 395this.Width += 2*width; 430this.Width = result.Width;
System.Web.DataVisualization (31)
Common\General\ChartGraphics.cs (2)
2420 absPositionRounded.Width = (int)Math.Round(absPosition.Right) - absPositionRounded.X; 2559 absPositionRounded.Width = (int)Math.Round(absPosition.Right) - absPositionRounded.X;
Common\General\Legend.cs (19)
749 cellPosition.Width += overlappedCellPosition.Right - cellPosition.Right; 859 cellPosition.Width = this._subColumnSizes[columnIndex, cellIndex]; 2471 separatorPosition.Width = right - separatorPosition.X; 2496 separatorRect.Width = this.GetSeparatorSize(this.ItemColumnSeparator).Width; 4043 legendPosition.Width -= 2 * this.GetBorderSize(); 4047 ++legendPosition.Width; 4081 rect.Width = this._subColumnSizes[columnIndex, subColumnIndex]; 4117 fillRect.Width += fillRect.X - legendPosition.X; 4127 fillRect.Width += legendPosition.Right - fillRect.Right + 1; 4136 fillRect.Width += this._itemColumnSpacingRel / 2; 4146 fillRect.Width += this._itemColumnSpacingRel / 2; 4161 fillRect.Width -= (legendPosition.Right - fillRect.Right); 4166 fillRect.Width -= (legendPosition.X - fillRect.X); 4215 separatorRect.Width = columnWidth; 4220 legendPosition.Width -= 1; 4275 legendPosition.Width -= 2 * this.GetBorderSize(); 4279 ++legendPosition.Width; 4319 rect.Width -= this.GetBorderSize() * 2 + this._offset.Width; 4337 legendPosition.Width -= 1;
Common\General\LegendColumns.cs (10)
1449 this.cellPosition.Width -= (int)(this.Margins.Left * singleWCharacterSize.Width / 100f) 2099imagePosition.Width = (int)imageSize.Width; 2104 imageCellPosition.Width = imagePosition.Width; 2116 imageCellPosition.Width = newWidth; 2142 imagePosition.Width = (int)(imagePosition.Width / scaleValue); 2231 seriesMarkerPosition.Width = newWidth; 2296imageScale.Width = (int)imageSize.Width; 2312imageScale.Width = (int)(imageScale.Width / scaleValue); 2437imageScale.Width = (int)imageSize.Width; 2453 imageScale.Width = (int)(imageScale.Width / scaleValue);
System.Windows.Forms (318)
misc\GDI\WindowsGraphics2.cs (1)
252bounds.Width = bounds.Width - bounds.X;
winforms\Managed\System\WinForms\AxHost.cs (1)
1775b.Width = p.Width;
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (12)
574imageBounds.Width += 1; 629r.Width += 1; 1146layout.focus.Width--; 1227layout.checkArea.Width = checkSizeFull + 1; 1233layout.field.Width -= checkSizeFull + 1; 1239layout.checkArea.Width = checkSizeFull + 1; 1244layout.field.Width -= checkSizeFull + 1; 1248layout.checkArea.Width = field.Width; 1259layout.checkArea.Width = field.Width; 1272layout.checkBounds.Width -= checkPaddingSize; 1382layout.textBounds.Width = textRight - layout.textBounds.X; 1386layout.imageBounds.Width = Math.Max(0, Math.Min(maxBounds.Width - layout.textBounds.Width, layout.imageBounds.Width));
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (6)
50bounds.Width--; 60bounds.Width--; 66bounds.Width++; 74bounds.Width++; 147fullSize.Width++; 151fullSize.Width++;
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxStandardAdapter.cs (2)
45layout.focus.Width = layout.textBounds.Width + layout.imageBounds.Width - 1; 50layout.focus.Width += 2;
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonBaseAdapter.cs (2)
47bounds.Width--; 82bounds.Width--;
winforms\Managed\System\WinForms\ComboBox.cs (2)
5943whiteFillRect.Width = WhiteFillRectWidth; 5945dropDownRect.Width -= WhiteFillRectWidth;
winforms\Managed\System\WinForms\Control.cs (2)
9741rectangle.Width--; 18264bounds.Width = adjusted.Width;
winforms\Managed\System\WinForms\ControlPaint.cs (4)
106result.Width = bounds.Width; 120result.Width = (int) ((imageSize.Width * yRatio) +.5); 1333rectangle.Width--; 1438rectangle.Width --;
winforms\Managed\System\WinForms\DataGrid.cs (35)
4524refresh.Width = layout.Inside.Width; 4852rightArea.Width -= left - rightArea.X; 4855rightArea.Width = rightArea.Width - left; 4892clip.Width = GetColBeg(col) - layout.Data.X - 2; 4898clip.Width = layout.Data.X + layout.Data.Width - leftEdge - 2; 4993rightArea.Width -= rightToLeft ? rightArea.Right - left : left - rightArea.X; 5405rowHeaders.Width = newRowHeaderWidth; 5407insideLeft.Width -= newRowHeaderWidth; 5412rowHeaders.Width = newRowHeaderWidth; 5414insideLeft.Width -= newRowHeaderWidth; 5424topLeft.Width = newRowHeaderWidth; 5425colHeaders.Width -= newRowHeaderWidth; 5431topLeft.Width = newRowHeaderWidth; 5433colHeaders.Width -= newRowHeaderWidth; 6328rowRect.Width += layout.RowHeaders.Width; 6452rowBounds.Width = layout.Data.Width; 6601columnArea.Width = gridColumns[column].Width; 6656invalid.Width = layout.RowHeaders.Width; 6764layout.Data.Width -= vertWidth; 6770layout.ColumnHeaders.Width -= vertWidth; 6793layout.Data.Width -= vertWidth; 6799layout.ColumnHeaders.Width -= vertWidth; 7124boundingRect.Width += negOffset; 7131boundingRect.Width = columnHeaderWidth; 7137boundingRect.Width --; 7174textBounds.Width = gridColumns[col].Width - 7181textBounds.Width = gridColumns[col].Width - 7264textBounds.Width = paintedWidth; 7278textBounds.Width -= cx; 7310bounds.Width --; 7433headerBounds.Width = layout.RowHeaders.Width; 7447rowBounds.Width -= headerBounds.Width; 7453dataBounds.Width += negOffset; 8183rowHdrRect.Width = layout.RowHeaders.Width; 8851underParentRows.Width += layout.RowHeaders.Width;
winforms\Managed\System\WinForms\DataGridParentRows.cs (7)
152ret.Width = layout.data.Width; 880paintBounds.Width = Math.Min(paintBounds.Width, tableNameBoxWidth); 891rowBounds.Width -= paintedWidth; 898paintBounds.Width = bounds.Width - paintedWidth; 924paintBounds.Width = Math.Min(bounds.Width - cx, colsNameWidths[i]); 943paintBounds.Width = Math.Min(bounds.Width - cx, colsDataWidths[i]); 970paintBounds.Width = Math.Min(bounds.Width - cx, 3);
winforms\Managed\System\WinForms\DataGridRelationshipRow.cs (3)
576bounds.Width -= errRect.Width + xOffset; 733textBounds.Width = this.dgTable.FocusedTextWidth; 735textBounds.Width = bounds.Width;
winforms\Managed\System\WinForms\DataGridRow.cs (1)
496cellBounds.Width = columns[col].Width - bWidth;
winforms\Managed\System\WinForms\DataGridTable.cs (2)
926relationshipRect.Width = longestRelationship + 5; 927relationshipRect.Width += 2; // relationshipRect border;
winforms\Managed\System\WinForms\DataGridTextBoxColumn.cs (1)
486bounds.Width -= xMargin;
winforms\Managed\System\WinForms\DataGridView.cs (4)
2699rectDisplay.Width -= this.vertScrollBar.Width; 3421rectTmp.Width++; 3431rectTmp.Width--; 3438rectTmp.Width -= totalVisibleFrozenWidth;
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (5)
450rectThemeMargins.Width = DATAGRIDVIEWBUTTONCELL_themeMargin - rectContent.Right; 731valBounds.Width -= borderWidths.Right; 751valBounds.Width -= cellStyle.Padding.Horizontal; 1014valBounds.Width -= 2 * DATAGRIDVIEWBUTTONCELL_horizontalTextMargin; 1021valBounds.Width--;
winforms\Managed\System\WinForms\DataGridViewCell.cs (12)
1071rect.Width = (advancedBorderStyle.Right == DataGridViewAdvancedCellBorderStyle.None) ? 0 : 1; 1074rect.Width++; 1091rect.Width += this.owningColumn.DividerWidth; 3601bounds.Width -= dividerThickness; 4359rectPadding.Width = cellStyle.Padding.Left; 4368rectPadding.Width = cellStyle.Padding.Right; 4373rectPadding.Width = bounds.Width - cellStyle.Padding.Horizontal; 4547borderAndPaddingWidths.Width += cellStyle.Padding.Right; 5117columnRect.Width = this.owner.OwningColumn.Width; 5130columnRect.Width += negOffset; 5151columnRect.Width = this.owner.OwningColumn.Width; 5155rowRect.Width = columnRect.Width;
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (4)
1175valBounds.Width -= borderWidths.Right; 1234valBounds.Width -= cellStyle.Padding.Horizontal; 1399checkBounds.Width++; 1420fullSize.Width++;
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (7)
795valBounds.Width -= borderWidths.Right; 816valBounds.Width -= cellStyle.Padding.Horizontal; 881valBounds.Width -= rectThemeMargins.X + rectThemeMargins.Width; 886valBounds.Width -= rectThemeMargins.X + rectThemeMargins.Width; 910valBounds.Width -= cellStyle.Padding.Horizontal; 928valBounds.Width -= DATAGRIDVIEWCOLUMNHEADERCELL_horizontalTextMarginLeft + DATAGRIDVIEWCOLUMNHEADERCELL_horizontalTextMarginRight; 954valBounds.Width -= sortGlyphSeparatorWidth +
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (16)
752borderAndPaddingWidths.Width += cellStyle.Padding.Right; 2005cellBounds.Width += this.DataGridView.FirstDisplayedScrollingColumnHiddenWidth; 2148valBounds.Width -= borderWidths.Right; 2184valBounds.Width -= cellStyle.Padding.Horizontal; 2460dropRect.Width++; 2477dropRect.Width--; 2501textBounds.Width++; 2508errorBounds.Width -= dropWidth; 2509textBounds.Width -= dropWidth; 2518errorBounds.Width -= dropWidth + 1; 2519textBounds.Width -= dropWidth + 1; 2545focusBounds.Width++; 2554focusBounds.Width -= 2; 2570valBounds.Width--; 2587textBounds.Width += 2 - DATAGRIDVIEWCOMBOBOXCELL_horizontalTextMarginLeft; 2592textBounds.Width += 1 - DATAGRIDVIEWCOMBOBOXCELL_horizontalTextMarginLeft;
winforms\Managed\System\WinForms\DataGridViewHeaderCell.cs (2)
489rectThemeMargins.Width = DATAGRIDVIEWHEADERCELL_themeMargin - rectContent.Right; 652valBounds.Width -= borderWidths.Right;
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (2)
820valBounds.Width -= borderWidths.Right; 836imgBounds.Width -= cellStyle.Padding.Horizontal;
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (5)
1013valBounds.Width -= borderWidths.Right; 1036valBounds.Width -= cellStyle.Padding.Horizontal; 1047valBounds.Width -= DATAGRIDVIEWLINKCELL_horizontalTextMarginLeft + DATAGRIDVIEWLINKCELL_horizontalTextMarginRight; 1076focusBounds.Width++; 1081focusBounds.Width++;
winforms\Managed\System\WinForms\DataGridViewMethods.cs (50)
2494cursorClip.Width = Math.Min(frozenWidth, this.layout.Data.Width); 2507cursorClip.Width = Math.Min(scrollingWidth, this.layout.Data.Width); 2568clip.Width = leftEdge - this.Columns[columnIndex].MinimumThickness - this.layout.Data.X + 3; 2573clip.Width -= overflowWidth; 2579clip.Width = this.layout.Data.Right - leftEdge - 1; 2583clip.Width -= overflowWidth; 2783clip.Width -= minimumRowHeadersWidth - 1; 4349inside.Width = 0; 4372rowHeaders.Width = Math.Min(this.rowHeadersWidth, rowHeaders.Width); 4381insideLeft.Width -= rowHeaders.Width; 4390topLeft.Width = Math.Min(this.rowHeadersWidth, topLeft.Width); 4391colHeaders.Width -= topLeft.Width; 4424insideLeft.Width--; 5503rectScrollingArea.Width -= emptyBackgroundWidth; 5518rectScrollingArea.Width -= frozenVisibleColumnsWidth; 6895rect.Width++; 7160rowRect.Width += width; 7169rowRect.Width += width; 9187rowRect.Width += this.layout.RowHeaders.Width; 10396this.layout.Data.Width -= vertScrollBarWidth; 10404this.layout.ColumnHeaders.Width -= vertScrollBarWidth; 10426this.layout.ColumnHeaders.Width += vertScrollBarWidth; 10432this.layout.Data.Width += vertScrollBarWidth; 10448this.layout.Data.Width -= vertScrollBarWidth; 10456this.layout.ColumnHeaders.Width -= vertScrollBarWidth; 14965rightArea.Width -= rightArea.Right - leftEdge; 14969rightArea.Width -= leftEdge - rightArea.X; 17200gridRect.Width++; 17241focusRect.Width -= change; 17247focusRect.Width += change; 17272edge.Width = 1; 19801rcNextRows.Width -= this.layout.RowHeaders.Width; 19809rcNextRows.Width--; 19817rcNextRows.Width -= rowsWidth; 19851edge.Width = borderWidth; 19907cellBounds.Width = dataGridViewColumn.Thickness; 19910cellBounds.Width++; 19961scrollingBounds.Width += this.negOffset; 19974rowRect.Width -= cx; 19984cellBounds.Width = dataGridViewColumn.Thickness; 19987cellBounds.Width++; 20066columnHeadersClip.Width++; 20228cellBounds.Width = this.rowHeadersWidth; 20378editingZone.Width = Math.Max(0, editingZone.Width - totalVisibleFrozenWidth); 20410cellBounds.Width++; 20411cellClip.Width++; 26449rowsRect.Width++; 26476rowsRect.Width = this.layout.RowHeaders.Width; 29069bottomArea.Width++; 29133bottomArea.Width++;
winforms\Managed\System\WinForms\DataGridViewRow.cs (7)
1619cellBounds.Width = dataGridViewColumn.Thickness; 1622cellBounds.Width++; 1685dataBounds.Width += dataGridView.FirstDisplayedScrollingColumnHiddenWidth; 1696rowRect.Width -= cx; 1706cellBounds.Width = dataGridViewColumn.Thickness; 1709cellBounds.Width++; 1798cellBounds.Width = dataGridView.RowHeadersWidth;
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (8)
787valBounds.Width -= borderWidths.Right; 805valBounds.Width -= cellStyle.Padding.Horizontal; 856valBounds.Width -= rectThemeMargins.Y + rectThemeMargins.Height; 883valBounds.Width -= cellStyle.Padding.Horizontal; 963valBounds.Width -= iconsWidth + 2 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth; 970valBounds.Width -= DATAGRIDVIEWROWHEADERCELL_horizontalTextMarginLeft + 2 * DATAGRIDVIEWROWHEADERCELL_contentMarginWidth + DATAGRIDVIEWROWHEADERCELL_horizontalTextMarginRight; 990valBounds.Width -= iconsWidth + 2 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth; 1219rowRect.Width = this.Owner.DataGridView.RowHeadersWidth;
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (8)
208editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetLeft - 2); 213editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetLeft - 1); 221editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - 3); 231editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetRight); 236editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetRight - 1); 698valBounds.Width -= borderWidths.Right; 732valBounds.Width -= cellStyle.Padding.Horizontal; 757valBounds.Width -= DATAGRIDVIEWTEXTBOXCELL_horizontalTextMarginLeft + DATAGRIDVIEWTEXTBOXCELL_horizontalTextMarginRight;
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (3)
277valBounds.Width -= borderWidths.Right; 328valBounds.Width -= cellStyle.Padding.Horizontal; 337valBounds.Width -= DATAGRIDVIEWTOPLEFTHEADERCELL_horizontalTextMarginLeft + DATAGRIDVIEWTOPLEFTHEADERCELL_horizontalTextMarginRight;
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (1)
294bounds.Width = BUTTON_WIDTH;
winforms\Managed\System\WinForms\DrawListViewColumnHeaderEventArgs.cs (2)
166r.Width -= 1; 173r.Width -= 1;
winforms\Managed\System\WinForms\DrawListViewItemEventArgs.cs (2)
177resultBounds.Width ++; 182resultBounds.Width -= 4;
winforms\Managed\System\WinForms\Form.cs (5)
3454bounds.Width = correct.Width; 5876restoredWindowBounds.Width = width; 5891restoreBounds.Width = width; 5997adjustedBounds.Width = Width; 7856r.Width -= r.X;
winforms\Managed\System\WinForms\GroupBox.cs (1)
562textRectangle.Width -= 2 * textOffset;
winforms\Managed\System\WinForms\GroupBoxRenderer.cs (8)
170textBounds.Width -= 2 * boxHeaderWidth; 172textBounds.Width = measuredBounds.Width; 194clipLeft.Width = boxHeaderWidth; 195clipMiddle.Width = Math.Max(0, textBounds.Width - 3); // -3 to account for the margin built in the MeasureText result 200clipRight.Width = clipMiddle.X - boxBounds.X; 206clipRight.Width = boxBounds.Right - clipRight.X; 263textBounds.Width -= textOffset; 265textBounds.Width = measuredBounds.Width;
winforms\Managed\System\WinForms\Layout\CommonProperties.cs (3)
214bounds.Width = Math.Min(bounds.Width, value.Width); 236bounds.Width = Math.Max(bounds.Width, value.Width); 289if (!wChangedButNotSpecified) originalBounds.Width = width;
winforms\Managed\System\WinForms\Layout\DockAndAnchorLayout.cs (2)
306remainingBounds.Width -= element.Bounds.Width; 316remainingBounds.Width -= element.Bounds.Width;
winforms\Managed\System\WinForms\Layout\FlowLayout.cs (1)
112displayRect.Width = Int32.MaxValue - displayRect.X;
winforms\Managed\System\WinForms\Layout\LayoutUtils.cs (8)
266withinThis.Width = alignThis.Width; 278withinThis.Width = alignThis.Width; 326rect.Width += padding.Horizontal; 334rect.Width -= padding.Horizontal; 440region1.Width = specifiedContent.Width; 442region2.Width -= specifiedContent.Width; 446region1.Width = specifiedContent.Width; 447region2.Width -= specifiedContent.Width;
winforms\Managed\System\WinForms\Layout\TableLayout.cs (2)
1229cellBounds.Width = Math.Max(cellBounds.Width, 1); 1238elementBounds.Width = Math.Min(cellBounds.Width, elementBounds.Width);
winforms\Managed\System\WinForms\ListBox.cs (2)
2333bounds.Width = Math.Max(ColumnWidth, bounds.Width); 2336bounds.Width = Math.Max(MaxItemWidth, bounds.Width);
winforms\Managed\System\WinForms\ListView.cs (3)
2647subItemBounds.Width = this.columnHeaders[0].Width; 4715rectInvalid.Width += rectInvalid.X; 4726rectInvalid.Width += this.ClientRectangle.Right - rectInvalid.Right;
winforms\Managed\System\WinForms\PictureBox.cs (1)
463result.Width = (int)(imageSize.Width * ratio);
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (1)
644box.Width --;
winforms\Managed\System\WinForms\PropertyGrid.cs (1)
5067r.Width --;
winforms\Managed\System\WinForms\PropertyGridInternal\DropDownButton.cs (1)
181inside.Width -= 3;
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (3)
1899rect.Width = totalWidth - rect.X; 2149rectPaint.Width --; 2156rect.Width -= cPaint + 2 * gridHost.GetValueStringIndent();
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (11)
2144rect.Width = size.Width - 1; 2148rect.Width = InternalLabelWidth - 1; 2152rect.Width = size.Width - InternalLabelWidth; 2373r.Width -= r.X; 4421rect.Width -= 1; 4433rect.Width -= (sizeBtn.Width); 4440rect.Width -= paintIndent + 1; 4444rect.Width -= EDIT_INDENT + 1; 4468rect.Width -= (LEFTDOT_SIZE * 2); 4484rect.Width -= 1; 5863newBounds.Width = dragBaseRect.Width - delta;
winforms\Managed\System\WinForms\ScrollableControl.cs (7)
270rect.Width = displayRect.Width; 288displayRectangle.Width = Math.Max(displayRectangle.Width, AutoScrollMinSize.Width); 407display.Width = client.Width; 437fullClient.Width += SystemInformation.VerticalScrollBarWidth; 440minClient.Width -= SystemInformation.VerticalScrollBarWidth; 595clientToBe.Width -= SystemInformation.VerticalScrollBarWidth; 1135displayRect.Width = width;
winforms\Managed\System\WinForms\SplitContainer.cs (6)
1551r.Width = SplitterWidthInternal ; 1554r.Width = minWeight; 1568r.Width = Width; 1571r.Width = minWeight; 1728splitterRect.Width = SplitterWidthInternal; 1735splitterRect.Width = this.Width;
winforms\Managed\System\WinForms\Splitter.cs (4)
460bounds.Width = value; 464bounds.Width = value; 676if (r.Width < minWeight) r.Width = minWeight; 680if (r.Width < minWeight) r.Width = minWeight;
winforms\Managed\System\WinForms\ToolStrip.cs (4)
855rect.Width -= gripwidth; 4293gripRectangle.Width = Grip.GripThickness; 4307gripRectangle.Width = displayRect.Width; 5500insertionRect.Width = ToolStrip.insertionBeamWidth;
winforms\Managed\System\WinForms\ToolStripDropDownButton.cs (1)
279options.client.Width -= widthOfDropDown;
winforms\Managed\System\WinForms\ToolStripHighContrastRenderer.cs (1)
302 bounds.Width -= 1;
winforms\Managed\System\WinForms\ToolStripOverflowButton.cs (1)
128bounds.Width = ParentInternal.Width;
winforms\Managed\System\WinForms\ToolStripPanel.cs (1)
1209bounds.Width = ParentInternal.DisplayRectangle.Width;
winforms\Managed\System\WinForms\ToolStripPanelCell.cs (1)
272bounds.Width -= spaceToFree;
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (6)
451cachedBounds.Width = (spaceToFree < 0) ? minSize.Width + -spaceToFree : minSize.Width; 945displayRect.Width = ToolStripPanel.ParentInternal.DisplayRectangle.Width - (ToolStripPanel.Margin.Horizontal + ToolStripPanel.Padding.Horizontal) - Row.Margin.Horizontal; 948displayRect.Width = raftingDisplayRectangle.Width - Row.Margin.Horizontal; 976dragBounds.Width += Row.Margin.Horizontal + ToolStripPanel.Padding.Horizontal +5; 1475dragBounds.Width += dragBounds.X - x; 1482dragBounds.Width += (nextRowBounds.Width >> 2) + Row.Margin.Right + ToolStripPanel.RowsInternal[index + 1].Margin.Left;
winforms\Managed\System\WinForms\ToolStripProfessionalRenderer.cs (6)
851beginGradient.Width = firstGradientWidth; 852endGradient.Width = secondGradientWidth + 1; 878endGradient.Width -= 1; 1065overflowBoundsFill.Width = overflowButtonWidth; 1284bounds.Width = dropDownMenu.Width - bounds.X; 1290bounds.Width = dropDownMenu.Width - bounds.X - dropDownMenu.Padding.Right;
winforms\Managed\System\WinForms\ToolStripSeparator.cs (1)
469rect.Width = dropDownMenu.Width -4;
winforms\Managed\System\WinForms\ToolStripSplitButton.cs (1)
381splitButtonButtonBounds.Width -= splitterWidth;
winforms\Managed\System\WinForms\ToolStripSystemRenderer.cs (3)
231bounds.Width -= 1; 285bounds.Width = 3; 396fillRect.Width -= 3; //its already 1 away from the right edge
winforms\Managed\System\WinForms\TreeView.cs (1)
2740bounds.Width += value;
winforms\Managed\System\WinForms\UpDownBase.cs (2)
828backRect.Width++; 844backRect.Width++;
System.Windows.Forms.DataVisualization (33)
Common\General\ChartGraphics.cs (2)
2420 absPositionRounded.Width = (int)Math.Round(absPosition.Right) - absPositionRounded.X; 2559 absPositionRounded.Width = (int)Math.Round(absPosition.Right) - absPositionRounded.X;
Common\General\Legend.cs (19)
749 cellPosition.Width += overlappedCellPosition.Right - cellPosition.Right; 859 cellPosition.Width = this._subColumnSizes[columnIndex, cellIndex]; 2471 separatorPosition.Width = right - separatorPosition.X; 2496 separatorRect.Width = this.GetSeparatorSize(this.ItemColumnSeparator).Width; 4043 legendPosition.Width -= 2 * this.GetBorderSize(); 4047 ++legendPosition.Width; 4081 rect.Width = this._subColumnSizes[columnIndex, subColumnIndex]; 4117 fillRect.Width += fillRect.X - legendPosition.X; 4127 fillRect.Width += legendPosition.Right - fillRect.Right + 1; 4136 fillRect.Width += this._itemColumnSpacingRel / 2; 4146 fillRect.Width += this._itemColumnSpacingRel / 2; 4161 fillRect.Width -= (legendPosition.Right - fillRect.Right); 4166 fillRect.Width -= (legendPosition.X - fillRect.X); 4215 separatorRect.Width = columnWidth; 4220 legendPosition.Width -= 1; 4275 legendPosition.Width -= 2 * this.GetBorderSize(); 4279 ++legendPosition.Width; 4319 rect.Width -= this.GetBorderSize() * 2 + this._offset.Width; 4337 legendPosition.Width -= 1;
Common\General\LegendColumns.cs (10)
1449 this.cellPosition.Width -= (int)(this.Margins.Left * singleWCharacterSize.Width / 100f) 2099imagePosition.Width = (int)imageSize.Width; 2104 imageCellPosition.Width = imagePosition.Width; 2116 imageCellPosition.Width = newWidth; 2142 imagePosition.Width = (int)(imagePosition.Width / scaleValue); 2231 seriesMarkerPosition.Width = newWidth; 2296imageScale.Width = (int)imageSize.Width; 2312imageScale.Width = (int)(imageScale.Width / scaleValue); 2437imageScale.Width = (int)imageSize.Width; 2453 imageScale.Width = (int)(imageScale.Width / scaleValue);
WinForm\Utilities\Printing.cs (2)
257marginPixel.Width = (int)(marginPixel.Width * (ev.Graphics.DpiX / 100.0f)); 266chartPosition.Width = (int)(chartPosition.Width * Math.Min(chartWidthScale, chartHeightScale));
System.Workflow.Activities (2)
Designers\ConditionalDesigner.cs (1)
98diamondRectangle.Width = compositeDesignerTheme.ConnectorSize.Height - 2 * e.AmbientTheme.Margin.Height + 2;
Designers\ListenDesigner.cs (1)
78roundRectangle.Width = compositeDesignerTheme.ConnectorSize.Height - 2 * e.AmbientTheme.Margin.Height - 1;
System.Workflow.ComponentModel (43)
AuthoringOM\Design\ActivityDesigner.cs (3)
2969bounds.Width += 1; bounds.Height += 1; 3044smartTagRectangle.Width = imageSize.Width + glyphSize.Width / 2 + 3 * margin.Width; 3104dropDownRectangle.Width = glyphSize.Width / 2;
AuthoringOM\Design\ActivityPreviewDesigner.cs (2)
799dropConnector.Width = (dropConnector.Width > ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0)) ? ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0) : dropConnector.Width; 996rectangle.Width *= 2;
AuthoringOM\Design\DesignerHelpers.cs (3)
203rectangle.Width = Math.Min(size.Width, destination.Width); 547bounds.Width += inflate.Width; 551bounds.Width += inflate.Width;
AuthoringOM\Design\DesignerWidgets.cs (17)
240itemRectangle.Width = itemRectangle.Height; 1297bounds.Width += DropShadowWidth; 1991this.drawItems[i].TabItemRectangle.Width = tabItemSize; 1998this.drawItems[i].TabItemRectangle.Width = this.reqTabItemSize; 2023this.drawItems[i].TabItemRectangle.Width -= itemSizeDecrease; 2025this.drawItems[i].TabItemRectangle.Width = this.reqTabItemSize; 2113textRectangle.Width -= (imageRectangle.Width + TabMargin); 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; 2758dropTargets[activeDropTarget].Width = itemMargin.Width; 2833stripRectangle.Width = (scrollRightButton.Left - margin.Width) - (scrollLeftButton.Right + margin.Width); 3383this.canvasBounds.Width = Math.Max(this.canvasBounds.Width, minWidth); 3391this.previewModeButtonRectangle.Width = this.previewModeButtonRectangle.Size.Height; 3464destnRectangle.Width = Convert.ToInt32(Math.Ceiling((float)previewedActivityImage.Width / stretchFactor));
AuthoringOM\Design\FreeFormDesigner.cs (2)
937bounds.Width = Math.Max(minRectangle.Right - bounds.Left, e.Bounds.Right - bounds.Left); 1140enclosingRectangle.Width = rightBottom.X - leftTop.X;
AuthoringOM\Design\Glyphs\ConfigErrorGlyph.cs (2)
57bounds.Width *= 2; 87activatedBounds.Width -= (bounds.Width + 2 * ambientTheme.Margin.Width);
AuthoringOM\Design\MessageFilters\ResizingMessageFilter.cs (3)
290designerBounds.Width += (designerBounds.Left - x); 308designerBounds.Width += (point.X - designerBounds.Right); 314designerBounds.Width = Math.Max(designerBounds.Width, designerToSize.MinimumSize.Width);
AuthoringOM\Design\SequentialWorkflowHeaderFooter.cs (1)
111bounds.Width = Math.Max(imageBounds.Width, textBounds.Width) + 2 * margin.Width;
AuthoringOM\Design\SequentialWorkflowRootDesigner.cs (3)
371imageRectangle.Width += SequentialWorkflowRootDesigner.HeaderFooterSizeIncr; 401headerBarRectangle.Width = AssociatedDesigner.Size.Width; 454imageRectangle.Width += SequentialWorkflowRootDesigner.HeaderFooterSizeIncr;
AuthoringOM\Design\WorkflowLayouts.cs (6)
433insersectedLogicalViewPort.Width = pageLayoutData.LogicalPageBounds.Width - deltaLocation.X; 434insersectedLogicalViewPort.Width -= deltaSize.Width; 468insersectedPhysicalViewPort.Width = pageLayoutData.ViewablePageBounds.Width - deltaLocation.X; 469insersectedPhysicalViewPort.Width -= deltaSize.Width; 566viewPortBitmapArea.Width = pageLayoutData.LogicalPageBounds.Width; 672viewPortBitmapArea.Width = intersectedViewPort.Width;
AuthoringOM\Design\WorkflowPrinting.cs (1)
267layoutRectangle.Width = Math.Min(headerFooterPrintData.PageBoundsWithoutMargin.Width, layoutRectangle.Width);
System.WorkflowServices (1)
System\Workflow\Activities\Design\GradientPanel.cs (1)
86frameRect.Width += Margin.Left + Margin.Right;
1295 references to Width
System.Drawing (64)
commonui\System\Drawing\Advanced\GPRECT.cs (1)
32Width = rect.Width;
commonui\System\Drawing\Advanced\GraphicsPath.cs (4)
803AddArc(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); 1170rect.Width, rect.Height); 1229AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); 1259AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
commonui\System\Drawing\Advanced\LinearGradientBrush.cs (2)
144if (rect.Width == 0 || rect.Height == 0) { 240if (rect.Width == 0 || rect.Height == 0) {
commonui\System\Drawing\Advanced\RectangleF.cs (1)
479return new RectangleF(r.X, r.Y, r.Width, r.Height);
commonui\System\Drawing\Advanced\TextureBrush.cs (2)
167dstRect.Width, 278dstRect.Width,
commonui\System\Drawing\Bitmap.cs (2)
490if (rect.Width == 0 || rect.Height == 0) { 499rect.Width,
commonui\System\Drawing\BufferedGraphicsContext.cs (5)
117Debug.WriteLineIf(DoubleBuffering.TraceWarning, "Too big of buffer requested (" + targetRectangle.Width + " x " + targetRectangle.Height + ") ... allocating temp buffer manager"); 132Debug.WriteLineIf(DoubleBuffering.TraceWarning, "Too big of buffer requested (" + targetRectangle.Width + " x " + targetRectangle.Height + ") ... allocating temp buffer manager"); 170surface = CreateBuffer(destDc, -targetLoc.X, -targetLoc.Y, targetRectangle.Width, targetRectangle.Height); 177surface = CreateBuffer(targetDC, -targetLoc.X, -targetLoc.Y, targetRectangle.Width, targetRectangle.Height); 674return (targetBounds.Width * targetBounds.Height) > (MaximumBuffer.Width * MaximumBuffer.Height);
commonui\System\Drawing\Graphics.cs (19)
1307DrawArc(pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); 1411DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height); 1546DrawEllipse(pen, rect.X, rect.Y, rect.Width, rect.Height); 1607DrawPie(pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, 2022FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height); 2208FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height); 2238FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height, startAngle, 2834DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height); 2897int width = Math.Min(rect.Width, image.Width); 3030srcRect.Width, 3090destRect.Width, 3094srcRect.Width, 3256srcRect.Width, 3312destRect.Width, 3367destRect.Width, 3959rect.Width, rect.Height, combineMode); 4026rect.Width, rect.Height, CombineMode.Intersect); 4065rect.Width, rect.Height, CombineMode.Exclude); 4356rect.Width, rect.Height, out isVisible);
commonui\System\Drawing\Icon.cs (2)
434imageWidth = imageRect.Width; 445targetWidth = targetRect.Width;
commonui\System\Drawing\Printing\PrintController.cs (1)
266pageBounds.Width - (pageSettings.Margins.Left + pageSettings.Margins.Right),
commonui\System\Drawing\Printing\PrinterUnitConvert.cs (1)
85Convert(value.Width, fromUnit, toUnit),
commonui\System\Drawing\Rectangle.cs (20)
115return new Size(Width, Height); 216return X + Width; 237/// Tests whether this <see cref='System.Drawing.Rectangle'/> has a <see cref='System.Drawing.Rectangle.Width'/> 265(comp.Width == this.Width) && 279&& left.Width == right.Width 340x < this.X + this.Width && 368((rect.X + rect.Width) <= (this.X + this.Width)) && 381(((UInt32)Width << 26) | ((UInt32)Width >> 6)) ^ 430this.Width = result.Width; 440int x2 = Math.Min(a.X + a.Width, b.X + b.Width); 458return(rect.X < this.X + this.Width) && 459(this.X < (rect.X + rect.Width)) && 474int x2 = Math.Max(a.X + a.Width, b.X + b.Width); 509",Width=" + Width.ToString(CultureInfo.CurrentCulture) +
commonui\System\Drawing\RectangleConverter.cs (2)
130args[nArg++] = intConverter.ConvertToString(context, culture, rect.Width); 142rect.X, rect.Y, rect.Width, rect.Height});
commonui\System\Drawing\Region.cs (1)
967rect.Width, rect.Height,
misc\GDI\WindowsRegion.cs (1)
135this.nativeHandle = IntSafeNativeMethods.CreateRectRgn(rect.X, rect.Y, rect.X+rect.Width, rect.Y+rect.Height);
System.Web.DataVisualization (43)
Common\General\Legend.cs (10)
476 legendPosition.Width, 513 legendPosition.Width - (this.GetBorderSize() + this._offset.Width) * 2, 531 legendPosition.Width - 2 * (this._offset.Width + this.GetBorderSize()), 2503 if(separatorRect.Width > 0 && separatorRect.Height > 0) 2522 separatorRect.X += separatorRect.Width; 2536 int step = (this._legendItemsAreaPosition.Width / 3) / markerCount; 2541 this._legendItemsAreaPosition.X + this._legendItemsAreaPosition.Width / 2 - step * (float)Math.Floor(markerCount/2f), 4032 this._headerPosition.Width > 0 && 4089 columnWidth += rect.Width; 4093 if(rect.Width > 0 && rect.Height > 0)
Common\General\LegendColumns.cs (32)
1915 if(this.cellPosition.Width <= 0 || this.cellPosition.Height <= 0) 2104 imageCellPosition.Width = imagePosition.Width; 2112 if(newWidth > this.cellPosition.Width) 2114 newWidth = this.cellPosition.Width; 2135 if(imagePosition.Width > imageCellPosition.Width) 2137 scaleValue = Math.Max(scaleValue, (float)imagePosition.Width / (float)imageCellPosition.Width); 2142 imagePosition.Width = (int)(imagePosition.Width / scaleValue); 2145 imagePosition.X = (int)((this.cellPosition.X + this.cellPosition.Width/2f) - imagePosition.Width/2f); 2159 imagePosition.X = this.cellPosition.Right - imagePosition.Width; 2227 if(newWidth > this.cellPosition.Width) 2229 newWidth = this.cellPosition.Width; 2244 if(seriesMarkerPosition.Height <= 0 || seriesMarkerPosition.Width <= 0) 2250 seriesMarkerPosition.X = (int)((this.cellPosition.X + this.cellPosition.Width/2f) - seriesMarkerPosition.Width/2f); 2264 seriesMarkerPosition.X = this.cellPosition.Right - seriesMarkerPosition.Width; 2305if (imageScale.Width > seriesMarkerPosition.Width) 2307scaleValue = Math.Max(scaleValue, (float)imageScale.Width / (float)seriesMarkerPosition.Width); 2312imageScale.Width = (int)(imageScale.Width / scaleValue); 2314imageScale.X = (int)((seriesMarkerPosition.X + seriesMarkerPosition.Width / 2f) - imageScale.Width / 2f); 2407 int markerSize = (int)Math.Min(seriesMarkerPosition.Width, seriesMarkerPosition.Height); 2423 point.X = (int)(seriesMarkerPosition.X + seriesMarkerPosition.Width/2f); 2446 if(imageScale.Width > seriesMarkerPosition.Width) 2448 scaleValue = Math.Max(scaleValue, (float)imageScale.Width / (float)seriesMarkerPosition.Width); 2453 imageScale.Width = (int)(imageScale.Width / scaleValue);
WebForm\ChartWebControl.cs (1)
1053this.chartPicture.Width = position.Width;
System.Web.Mobile (2)
UI\MobileControls\Design\Util\GroupLabel.cs (2)
51g.DrawLine(SystemPens.ControlDark, etchLeft, etchTop, r.Width, etchTop); 54g.DrawLine(SystemPens.ControlLightLight, etchLeft, etchTop, r.Width, etchTop);
System.Windows.Forms (947)
misc\GDI\WindowsGraphics2.cs (5)
91int sideLength = Math.Min(bounds.Width, bounds.Height); 250if( bounds.Width == MaxSize.Width ) 252bounds.Width = bounds.Width - bounds.X; 580DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height); 618FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height);
misc\GDI\WindowsRegion.cs (1)
135this.nativeHandle = IntSafeNativeMethods.CreateRectRgn(rect.X, rect.Y, rect.X+rect.Width, rect.Y+rect.Height);
winforms\Managed\System\WinForms\AccessibleObject.cs (2)
1365pcxWidth = bounds.Width; 1381pcxWidth = bounds.Width;
winforms\Managed\System\WinForms\AxHost.cs (3)
1578if (oldBounds.X == x && oldBounds.Y == y && oldBounds.Width == width && 1589if (width != oldBounds.Width || height != oldBounds.Height) { 4616dest.right = source.Width + source.X;
winforms\Managed\System\WinForms\ButtonBase.cs (1)
1133ShowToolTip = (this.ClientRectangle.Width < preferredSize.Width || this.ClientRectangle.Height < preferredSize.Height);
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (26)
179Point p1 = new Point(bounds.X + bounds.Width - 1, bounds.Y ); // upper inner right. 182Point p4 = new Point(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1 ); // inner bottom right. 273Point p1 = new Point(bounds.X + bounds.Width - 1, bounds.Y ); // upper inner right. 276Point p4 = new Point(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1 ); // inner bottom right. 343Point p1 = new Point(bounds.X + bounds.Width - 1, bounds.Y ); // upper inner right. 346Point p4 = new Point(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1 ); // inner bottom right. 505size = System.Math.Min(size, System.Math.Min(r.Width, r.Height)); 512g.FillRectangle(brush, (r.X + r.Width - size), r.Y, size, r.Height); 515g.FillRectangle(brush, (r.X + size), r.Y, (r.Width - size * 2), size); 518g.FillRectangle(brush, (r.X + size), (r.Y + r.Height - size), (r.Width - size * 2), size); 608g.DrawRectangle(pen, r.X, r.Y, r.Width - 1, r.Height - 1); 1131layout.textBounds.Width + 2, layout.textBounds.Height + 3); 1144if (layout.focus.Width % 2 == 0) { 1206layout.checkBounds.X = (field.X+field.Width) - layout.checkBounds.Width; 1209layout.checkBounds.X = field.X + (field.Width - layout.checkBounds.Width)/2; 1238layout.checkArea.X = field.X + field.Width - checkSizeFull; 1248layout.checkArea.Width = field.Width; 1259layout.checkArea.Width = field.Width; 1381layout.textBounds.X = Math.Max(Math.Min(layout.textBounds.X, layout.field.X + (layout.field.Width - layout.textBounds.Width)/2), layout.field.X); 1386layout.imageBounds.Width = Math.Max(0, Math.Min(maxBounds.Width - layout.textBounds.Width, layout.imageBounds.Width)); 1387layout.textBounds.X = layout.imageBounds.X + layout.imageBounds.Width;
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (4)
146if (fullSize.Width == checkSize) { 244cacheCheckImage.Width == fullSize.Width && 257NativeMethods.RECT rcCheck = NativeMethods.RECT.FromXYWH(0, 0, fullSize.Width, fullSize.Height); 258Bitmap bitmap = new Bitmap(fullSize.Width, fullSize.Height);
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxStandardAdapter.cs (2)
45layout.focus.Width = layout.textBounds.Width + layout.imageBounds.Width - 1;
winforms\Managed\System\WinForms\CheckedListBox.cs (6)
703box.X = bounds.X + bounds.Width - idealCheckSize - scaledListItemStartPosition; 723bounds.Width - (idealCheckSize + (scaledListItemStartPosition * 2)), 769textBounds.Width - BORDER_SIZE, 845e.Bounds.Width > 2 * BORDER_SIZE && e.Bounds.Height > 2 * BORDER_SIZE) { 851bounds.Width - BORDER_SIZE, 1674return new Rectangle(pt.x, pt.y, rect.Width, rect.Height);
winforms\Managed\System\WinForms\ComboBox.cs (14)
4619int width = parentRect.Width; 5934outerBorder = new Rectangle(clientRect.Location, new Size(clientRect.Width - 1, clientRect.Height - 1)); 5935innerBorder = new Rectangle(outerBorder.X + 1, outerBorder.Y + 1, outerBorder.Width - dropDownButtonWidth - 2, outerBorder.Height - 2); 5936innerInnerBorder = new Rectangle(innerBorder.X + 1, innerBorder.Y + 1, innerBorder.Width - 2, innerBorder.Height - 2); 5952innerBorder.X = clientRect.Width - innerBorder.Right; 5953innerInnerBorder.X = clientRect.Width - innerInnerBorder.Right; 5954dropDownRect.X = clientRect.Width - dropDownRect.Right; 5955whiteFillRect.X = clientRect.Width - whiteFillRect.Right + 1; // since we're filling, we need to move over to the next px. 5996g.DrawRectangle(outerBorderPen, new Rectangle(outerBorder.X, outerBorder.Y, dropDownRect.Width + 1, outerBorder.Height)); 6006g.DrawRectangle(outerBorderPen, new Rectangle(outerBorder.X, outerBorder.Y, dropDownRect.Width + 1, outerBorder.Height)); 6040g.DrawRectangle(innerPen, new Rectangle(outerBorder.X, outerBorder.Y, dropDownRect.Width + 1, outerBorder.Height)); 6065Point middle = new Point(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 6068middle.X -= (dropDownRect.Width % 2); 6072middle.X += (dropDownRect.Width % 2);
winforms\Managed\System\WinForms\CommonDialog.cs (1)
180int x = screen.X + (screen.Width - r.right + r.left) / 2;
winforms\Managed\System\WinForms\Control.cs (18)
1376SetBounds(value.X, value.Y, value.Width, value.Height, BoundsSpecified.All); 6157if (targetBounds.Width <= 0 || targetBounds.Height <= 0 6167int width = Math.Min(this.Width, targetBounds.Width); 6620int sw = bounds.Width; 6627int localWidth = bounds.Width - adornmentWidth; 7313NativeMethods.RECT rcArea = NativeMethods.RECT.FromXYWH(rc.X, rc.Y, rc.Width, rc.Height); 7322NativeMethods.RECT.FromXYWH(rc.X, rc.Y, rc.Width, 9744e.Graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1); 9806Rectangle newClipRect = new Rectangle(rectangle.Left + this.Left, rectangle.Top + this.Top, rectangle.Width, rectangle.Height); 11061NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(r.X, r.Y, r.Width, r.Height); 11078NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(r.X, r.Y, r.Width, r.Height); 11875width = adjustedBounds.Width; 13685if (!doubleBuffered || (clip.Width > 0 && clip.Height > 0)) { 14513if (sizeProperty != null && !sizeProperty.IsReadOnly && (bounds.Width != this.Width || bounds.Height != this.Height)) { 14536SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified); 18270ioleClientSite.OnPosRectChange(NativeMethods.COMRECT.FromXYWH(bounds.X, bounds.Y, bounds.Width, bounds.Height)); 18363adjustRect.right = posRect.Width + posRect.X; 18406NativeMethods.RECT rcIntersect = NativeMethods.RECT.FromXYWH(intersect.X, intersect.Y, intersect.Width, intersect.Height);
winforms\Managed\System\WinForms\ControlPaint.cs (83)
92if (szCtl.Width > result.Width) { 93result.X = (szCtl.Width - result.Width) / 2; 102float xRatio = (float)bounds.Width / (float)imageSize.Width; 106result.Width = bounds.Width; 123result.X = (bounds.Width - result.Width) /2; 482imageRectangle.X += clipRect.Width - imageRectangle.Width; 503g.DrawImage(backgroundImage, imageRect, partOfImageToDraw.X, partOfImageToDraw.Y, partOfImageToDraw.Width, 512g.DrawImage(backgroundImage, imageRect, partOfImageToDraw.X, partOfImageToDraw.Y, partOfImageToDraw.Width, 610topLineRights[i] = bounds.X + bounds.Width - rightOffset - 1; 646bottomLineRights[i] = bounds.X + bounds.Width - rightOffset - 1; 845graphics.DrawLine(pen, bounds.X + bounds.Width - 1 - i, rightLineTops[i], bounds.X + bounds.Width - 1 - i, rightLineBottoms[i]); 853graphics.DrawLine(pen, bounds.X + bounds.Width - 1 - i, rightLineTops[i], bounds.X + bounds.Width - 1 - i, rightLineBottoms[i]); 861graphics.DrawLine(pen, bounds.X + bounds.Width - 1 - i, rightLineTops[i], bounds.X + bounds.Width - 1 - i, rightLineBottoms[i]); 870graphics.DrawLine(pen, bounds.X + bounds.Width - 1 - i, rightLineTops[i], bounds.X + bounds.Width - 1 - i, rightLineBottoms[i]); 881graphics.DrawLine(pen, bounds.X + bounds.Width - 1 - i, rightLineTops[i], bounds.X + bounds.Width - 1 - i, rightLineBottoms[i]); 896DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, Border3DStyle.Etched, 906DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, style, 917DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, style, sides); 992bounds.X + bounds.Width - 1, bounds.Y); 999bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); 1000graphics.DrawLine(pen, bounds.X + bounds.Width - 1, bounds.Y, 1001bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); 1006bounds.X + bounds.Width - 2, bounds.Y + 1); 1014bounds.X + bounds.Width - 2, bounds.Y + bounds.Height - 2); 1015graphics.DrawLine(pen, bounds.X + bounds.Width - 2, bounds.Y + 1, 1016bounds.X + bounds.Width - 2, bounds.Y + bounds.Height - 2); 1030bounds.X + bounds.Width - 1, bounds.Y); 1041bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); 1042graphics.DrawLine(pen, bounds.X + bounds.Width - 1, bounds.Y, 1043bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); 1057bounds.X + bounds.Width - 2, bounds.Y + 1); 1070bounds.X + bounds.Width - 2, bounds.Y + bounds.Height - 2); 1071graphics.DrawLine(pen, bounds.X + bounds.Width - 2, bounds.Y + 1, 1072bounds.X + bounds.Width - 2, bounds.Y + bounds.Height - 2); 1100graphics.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1112DrawButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1129DrawCaptionButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, button, state); 1147DrawCheckBox(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1170DrawComboButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1194graphics.FillRectangle(brush, bounds.Left + 1, bounds.Top + 1, bounds.Width - 2, bounds.Height - 2); 1202int midx = bounds.X + bounds.Width/2; 1258if (rectangle.Width < 0 || rectangle.Height < 0) { 1263rectangle.Width - 2, rectangle.Height - 2); 1269if (checkImage == null || checkImage.Width != rectangle.Width || checkImage.Height != rectangle.Height) { 1278NativeMethods.RECT rcCheck = NativeMethods.RECT.FromXYWH(0, 0, rectangle.Width, rectangle.Height); 1279Bitmap bitmap = new Bitmap(rectangle.Width, rectangle.Height); 1304graphics.DrawRectangle(pen, offsetRectangle.X, offsetRectangle.Y, offsetRectangle.Width - 1, offsetRectangle.Height - 1); 1436Rectangle fillRect = new Rectangle(rectangle.X + 1, rectangle.Y + 1, rectangle.Width - 1, rectangle.Height - 1); 1677graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1); 1679graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1); 1688graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1); 1696DrawMenuGlyph(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, glyph); 1706DrawMenuGlyph(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, glyph, foreColor, backColor); 1733DrawMixedCheckBox(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1750DrawRadioButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1849DrawScrollButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, button, state); 1891DrawSizeGrip(graphics, backColor, bounds.X, bounds.Y, bounds.Width, bounds.Height); 2014SafeNativeMethods.PatBlt(new HandleRef(null, dc), rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, rop3); 2459g.DrawLine(pen, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 2463g.DrawLine(SystemPens.ControlDark, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2464g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2471bound = new Rectangle(bound.X + 1, bound.Y + 1, bound.Width - 1, bound.Height - 1); 2473g.DrawLine(pen, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 2477g.DrawLine(SystemPens.ControlDark, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2478g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2482g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 2485g.DrawLine(pen, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2486g.DrawLine(pen, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2496bound = new Rectangle(bound.X + 1, bound.Y + 1, bound.Width - 1, bound.Height - 1); 2497g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 2500g.DrawLine(pen, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2501g.DrawLine(pen, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1);
winforms\Managed\System\WinForms\Cursor.cs (3)
193NativeMethods.RECT rcClip = NativeMethods.RECT.FromXYWH(value.X, value.Y, value.Width, value.Height); 438imageWidth = imageRect.Width; 449targetWidth = targetRect.Width;
winforms\Managed\System\WinForms\DataGrid.cs (46)
347vertScrollBar.Left = ClientRectangle.Width - vertScrollBar.Width; 2250int widthNotVisible = totalWidth - layout.Data.Width; 4478right = new Rectangle(oldClientRectangle.X + oldClientRectangle.Width - borderWidth, 4484oldClientRectangle.Width, 4488if (newClientRectangle.Width != oldClientRectangle.Width) { 4490right = new Rectangle(newClientRectangle.X + newClientRectangle.Width - borderWidth, 4500newClientRectangle.Width, 4524refresh.Width = layout.Inside.Width; 4703Rectangle r = new Rectangle(inside.X, e.Y, inside.Width, 3); 4808int visibleWidth = layout.Data.Width; 4855rightArea.Width = rightArea.Width - left; 4898clip.Width = layout.Data.X + layout.Data.Width - leftEdge - 2; 4958int visibleWidth = this.layout.Data.Width; 5515int visibleWidth = layout.Data.Width; 5775rowExclude.Width, 5860SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 6205while (cx < inside.Width + inside.X && col < columnCount) { 6325inside.Width, 6328rowRect.Width += layout.RowHeaders.Width; 6329rowRect.X -= isRightToLeft() ? 0 : layout.RowHeaders.Width; 6452rowBounds.Width = layout.Data.Width; 6656invalid.Width = layout.RowHeaders.Width; 6669Rectangle inner = new Rectangle(rowRect.X + r.X, rowRect.Y + r.Y, r.Width, r.Height); 6751if (totalWidth > layout.Data.Width && !needHorizScrollbar) { 6779if (needVertScrollbar && totalWidth > layout.Data.Width && !needHorizScrollbar) { 6818int widthNotVisible = totalWidth - layout.Data.Width; 6826horizScrollBar.Bounds = new Rectangle(alignToRight ? layout.Inside.X + layout.ResizeBoxRect.Width : layout.Inside.X, 6828layout.Inside.Width - layout.ResizeBoxRect.Width, 7160if (cx > boundingRect.Width) 7176textBounds.X = boundingRect.Right - cx - textBounds.Width; 7259int paintedWidth = textBounds.Width + (columnSorted ? textBounds.Height : 0); 7272if (cx < boundingRect.Width) { 7303g.FillRectangle(br, bounds.X, bounds.Y, bounds.Width + 2, 2); 7305g.FillRectangle(br, bounds.X, bounds.Bottom - 2, bounds.Width + 2, 2); 7337if (layout.TopLeftHeader.Width > 0) { 7433headerBounds.Width = layout.RowHeaders.Width; 7437headerBounds.X = rowBounds.Right - headerBounds.Width; 7446rowBounds.X += headerBounds.Width; 7447rowBounds.Width -= headerBounds.Width; 8183rowHdrRect.Width = layout.RowHeaders.Width; 8628NativeMethods.RECT scrollArea = NativeMethods.RECT.FromXYWH(rowsRect.X, rowsRect.Y, rowsRect.Width, rowsRect.Height); 8850underParentRows.X -= isRightToLeft() ? 0 : layout.RowHeaders.Width; 8851underParentRows.Width += layout.RowHeaders.Width; 8881NativeMethods.RECT scrollRECT = NativeMethods.RECT.FromXYWH(underParentRows.X, underParentRows.Y - layout.ParentRows.Height, underParentRows.Width, underParentRows.Height + layout.ParentRows.Height);
winforms\Managed\System\WinForms\DataGridBoolColumn.cs (6)
156return new Rectangle(bounds.X +((bounds.Width - idealCheckSize) /2), 158bounds.Width < idealCheckSize ? bounds.Width : idealCheckSize, 161return new Rectangle(Math.Max(0,bounds.X +((bounds.Width - idealCheckSize) /2)), 163bounds.Width < idealCheckSize ? bounds.Width : idealCheckSize,
winforms\Managed\System\WinForms\DataGridCaption.cs (6)
473int backButtonArea = backButtonVisible ? backButtonRect.Width + xOffset + buttonToText : 0; 476int textWidthLeft = bounds.Width - xOffset - backButtonArea - downButtonArea; 488textRect.X = bounds.Right - textRect.Width; 538g.DrawImage(b, bounds, 0, 0, bounds.Width, bounds.Height,GraphicsUnit.Pixel, attr); 559if (textBounds.Width <= 0 || textBounds.Height <= 0) 563g.DrawRectangle(this.textBorderPen, textBounds.X, textBounds.Y, textBounds.Width - 1, textBounds.Height - 1);
winforms\Managed\System\WinForms\DataGridParentRows.cs (24)
152ret.Width = layout.data.Width; 327Rectangle r = new Rectangle(rect.X, rect.Y, rect.Width + borderWidth, rect.Height + borderWidth); 663if (totalWidth > bounds.Width) { 665layout.data = new Rectangle(layout.leftArrow.Right, bounds.Y, bounds.Width - 30, bounds.Height); 774int bmpX = bounds.X + (bounds.Width - b.Width) / 2; 784g.DrawImage(b, bmpRect, 0, 0, bmpRect.Width, bmpRect.Height,GraphicsUnit.Pixel, attr); 796g.DrawLine(Pens.Black, bounds.X, bounds.Y, bounds.X + bounds.Width, bounds.Y); // the top 797g.DrawLine(Pens.White, bounds.X + bounds.Width, bounds.Y, bounds.X + bounds.Width, bounds.Y + bounds.Height); // the right side 798g.DrawLine(Pens.White, bounds.X + bounds.Width, bounds.Y + bounds.Height, bounds.X, bounds.Y + bounds.Height); // the right side 880paintBounds.Width = Math.Min(paintBounds.Width, tableNameBoxWidth); 884paintedWidth += paintBounds.Width; 888if (paintedWidth >= bounds.Width) 889return bounds.Width; // we painted everything 896if (paintedWidth < bounds.Width) { 898paintBounds.Width = bounds.Width - paintedWidth; 913if (cx >= bounds.Width) 924paintBounds.Width = Math.Min(bounds.Width - cx, colsNameWidths[i]); 930cx += paintBounds.Width; 934if (cx >= bounds.Width) 943paintBounds.Width = Math.Min(bounds.Width - cx, colsDataWidths[i]); 951cx += paintBounds.Width; 970paintBounds.Width = Math.Min(bounds.Width - cx, 3); 1011return textBounds.Width;
winforms\Managed\System\WinForms\DataGridRelationshipRow.cs (20)
295outline.X = MirrorRectangle(outline.X, outline.Width, insideRowHeaders, alignToRight); 544trueRowBounds.Width, 576bounds.Width -= errRect.Width + xOffset; 578bounds.X += errRect.Width + xOffset; 606bounds.Width - (paintPlusMinus ? expandoBoxWidth : 0), 613bounds.Width - (paintPlusMinus ? expandoBoxWidth : 0), 619int expandoBoxX = MirrorRectangle(bounds.X + rowHeaderBounds.Width, expandoBoxWidth, bounds, alignToRight); 644relRect.X = alignToRight ? bounds.Right - relRect.Width : bounds.X; 646int paintedWidth = Math.Max(dataWidth, relRect.Width); 662g.DrawRectangle(SystemPens.ControlText, relRect.X, relRect.Y, relRect.Width - 1, relRect.Height - 1); 668g.FillRectangle(GetBackBrush(), relRect.X, relRect.Y + cy, relRect.Width, relRect.Height - cy); 674if (paintedWidth < bounds.Width) { 683bounds.Width - paintedWidth - bWidth + 1, // + 1 cause the relationship rectangle was deflated 706g.FillRectangle(GetBackBrush(), bounds.X, bounds.Y, bounds.Width, System.Windows.Forms.DataGridTableStyle.relationshipSpacing); 710bounds.Width, 735textBounds.Width = bounds.Width; 760g.DrawRectangle(drawPen, outline.X, outline.Y, outline.Width - 1, outline.Height - 1); 765outline.X + indent, outline.Y + outline.Width / 2, 766outline.Right - indent - 1, outline.Y + outline.Width/2); // -1 on the y coordinate 806return rowHeader.X - relRect.Width;
winforms\Managed\System\WinForms\DataGridRow.cs (13)
452if (dataWidth < bounds.Width) { 456bounds.Width - bottomBorder.Width, 489if (cx > bounds.Width) 499cellBounds.X = bounds.Right - cx - cellBounds.Width; 522cx += cellBounds.Width + bWidth; 526if (cx < bounds.Width) { 530bounds.Width - cx, 572g.DrawImage(bmp, bmpRect, 0, 0, bmpRect.Width, bmpRect.Height,GraphicsUnit.Pixel, attr); 599bounds.X += PaintIcon(g, bounds, true, alignToRight, bmp).Width + xOffset; 607bounds.X += PaintIcon(g, bounds, RowNumber == this.DataGrid.CurrentCell.RowNumber, alignToRight, bmp).Width + xOffset; 614bounds.X += PaintIcon(g, bounds, RowNumber == this.DataGrid.CurrentCell.RowNumber, alignToRight, bmp).Width + xOffset; 645bounds.X += errRect.Width + xOffset;
winforms\Managed\System\WinForms\DataGridToolTip.cs (1)
71toolInfo.rect = NativeMethods.RECT.FromXYWH(iconBounds.X, iconBounds.Y, iconBounds.Width, iconBounds.Height);
winforms\Managed\System\WinForms\DataGridView.cs (4)
512this.vertScrollBar.Left = this.ClientRectangle.Width - vertScrollBar.Width; 3112int displayWidth = this.layout.Data.Width; 3388int widthNotVisible = this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - this.layout.Data.Width; 3514else if (value > 0 && (this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - this.layout.Data.Width) <= 0)
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (7)
340int borderAndPaddingWidths = borderWidthsRect.Left + borderWidthsRect.Width + cellStyle.Padding.Horizontal; 355marginWidths = rectThemeMargins.X + rectThemeMargins.Width; 734if (valBounds.Height > 0 && valBounds.Width > 0) 757if (valBounds.Height > 0 && valBounds.Width > 0 && (paint || computeContentBounds)) 929Debug.Assert(valBounds.Height <= 0 || valBounds.Width <= 0); 938valBounds.Width > 2 * SystemInformation.Border3DSize.Width + 1 && 1025if (valBounds.Width > 0 && valBounds.Height > 0)
winforms\Managed\System\WinForms\DataGridViewCell.cs (18)
1249if (cellValueBounds.Width >= DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth && 3153if (contentBounds.Width > 0) 3159contentBounds.Width, 3573if (dividerThickness > bounds.Width) 3575dividerThickness = bounds.Width; 3602if (bounds.Width <= 0) 3630graphics.FillRectangle(this.DataGridView.GetCachedBrush(dividerHeightColor), bounds.X, bounds.Bottom - dividerThickness, bounds.Width, dividerThickness); 4301cellValueBounds.Width >= DATAGRIDVIEWCELL_iconMarginWidth*2+iconsWidth && 4324cellValueBounds.Width >= DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth && 4328if (iconBounds.Width >= DATAGRIDVIEWCELL_iconMarginWidth && iconBounds.Height >= iconsHeight) 4373rectPadding.Width = bounds.Width - cellStyle.Padding.Horizontal; 4512this.DataGridView.EditingControl.Size = new Size(editingControlBounds.Width, editingControlBounds.Height); 4549int xEditingPanel, wEditingPanel = cellBounds.Width; 4565if (cellClip.Right <= cellBounds.Right - borderAndPaddingWidths.Width) 4571wEditingPanel -= borderAndPaddingWidths.Width; 4575wEditingControl = cellBounds.Width - borderAndPaddingWidths.X - borderAndPaddingWidths.Width; 5155rowRect.Width = columnRect.Width;
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (7)
762int borderAndPaddingWidths = borderWidthsRect.Left + borderWidthsRect.Width + cellStyle.Padding.Horizontal; 1299if (valBounds.Width >= checkBoxSize.Width && valBounds.Height >= checkBoxSize.Height && (paint || computeContentBounds)) 1309checkBoxX = valBounds.Left + (valBounds.Width - checkBoxSize.Width) / 2; 1423if (checkImage == null || checkImage.Width != fullSize.Width || checkImage.Height != fullSize.Height) 1433NativeMethods.RECT rcCheck = NativeMethods.RECT.FromXYWH(0, 0, fullSize.Width, fullSize.Height); 1434Bitmap bitmap = new Bitmap(fullSize.Width, fullSize.Height); 1621Debug.Assert(valBounds.Width < checkBoxSize.Width || valBounds.Height < checkBoxSize.Height, "the bounds are empty");
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (17)
538int borderAndPaddingWidths = borderWidthsRect.Left + borderWidthsRect.Width + cellStyle.Padding.Horizontal; 703preferredSize.Width += rectThemeMargins.X + rectThemeMargins.Width; 821if (paint && DataGridViewCell.PaintBackground(paintParts) && backgroundBounds.Width > 0 && backgroundBounds.Height > 0) 859bmFlipXPThemes.Width < backgroundBounds.Width || bmFlipXPThemes.Width > 2 * backgroundBounds.Width || 862bmFlipXPThemes = this.FlipXPThemesBitmap = new Bitmap(backgroundBounds.Width, backgroundBounds.Height); 865DataGridViewColumnHeaderCellRenderer.DrawHeader(gFlip, new Rectangle(0, 0, backgroundBounds.Width, backgroundBounds.Height), state); 867g.DrawImage(bmFlipXPThemes, backgroundBounds, new Rectangle(bmFlipXPThemes.Width - backgroundBounds.Width, 0, backgroundBounds.Width, backgroundBounds.Height), GraphicsUnit.Pixel); 880valBounds.X += rectThemeMargins.Width; 881valBounds.Width -= rectThemeMargins.X + rectThemeMargins.Width; 886valBounds.Width -= rectThemeMargins.X + rectThemeMargins.Width; 891if (paint && DataGridViewCell.PaintBackground(paintParts) && backgroundBounds.Width > 0 && backgroundBounds.Height > 0) 923if (valBounds.Width - DATAGRIDVIEWCOLUMNHEADERCELL_horizontalTextMarginLeft - DATAGRIDVIEWCOLUMNHEADERCELL_horizontalTextMarginRight > 0 && 943int width = valBounds.Width - 1007valBounds.Width >= sortGlyphWidth + 2 * sortGlyphHorizontalMargin && 1011sortGlyphLocation = new Point(valBounds.Left + (valBounds.Width-sortGlyphWidth)/2,
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (31)
755Size adjustedSize = new Size(size.Width - borderAndPaddingWidths.X - borderAndPaddingWidths.Width, 780if (x >= size.Width - borderAndPaddingWidths.Width - dropWidth - 1 && 781x <= size.Width - borderAndPaddingWidths.Width - 1) 1372int borderAndPaddingWidths = borderWidthsRect.Left + borderWidthsRect.Width + cellStyle.Padding.Horizontal; 2169if (paint && DataGridViewCell.PaintBackground(paintParts) && br.Color.A == 255 && valBounds.Width > 0 && valBounds.Height > 0) 2188if (paint && valBounds.Width > 0 && valBounds.Height > 0) 2194g.FillRectangle(br, valBounds.Left, valBounds.Top, valBounds.Width, valBounds.Height); 2208DataGridViewCell.PaintBackground(paintParts) && br.Color.A == 255 && valBounds.Width > 2 && valBounds.Height > 2) 2210g.FillRectangle(br, valBounds.Left + 1, valBounds.Top + 1, valBounds.Width - 2, valBounds.Height - 2); 2217g.DrawRectangle(SystemPens.ControlLightLight, new Rectangle(valBounds.X, valBounds.Y, valBounds.Width-1, valBounds.Height-1)); 2221g.FillRectangle(br, valBounds.Left, valBounds.Top, valBounds.Width, valBounds.Height); 2226int dropWidth = Math.Min(SystemInformation.HorizontalScrollBarThumbWidth, valBounds.Width - 2 * DATAGRIDVIEWCOMBOBOXCELL_margin - 1); 2368dropRect.X + dropRect.Width - 1, dropRect.Y); 2376valBounds.X + valBounds.Width - 1, valBounds.Y + valBounds.Height - 1); 2377g.DrawLine(pen, valBounds.X + valBounds.Width - 1, valBounds.Y, 2378valBounds.X + valBounds.Width - 1, valBounds.Y + valBounds.Height - 1); 2390dropRect.X + dropRect.Width - 1, dropRect.Y + dropRect.Height - 1); 2391g.DrawLine(pen, dropRect.X + dropRect.Width - 1, dropRect.Y, 2392dropRect.X + dropRect.Width - 1, dropRect.Y + dropRect.Height - 1); 2398valBounds.X + valBounds.Width - 2, valBounds.Y); 2414dropRect.X + dropRect.Width - 2, dropRect.Y + 1); 2428dropRect.X + dropRect.Width - 2, dropRect.Y + dropRect.Height - 2); 2429g.DrawLine(pen, dropRect.X + dropRect.Width - 2, dropRect.Y + 1, 2430dropRect.X + dropRect.Width - 2, dropRect.Y + dropRect.Height - 2); 2441Point middle = new Point(dropRect.Left + dropRect.Width / 2, dropRect.Top + dropRect.Height / 2); 2443middle.X += (dropRect.Width % 2); 2462Point middle = new Point(dropRect.Left + (dropRect.Width - 1) / 2, 2465middle.X += ((dropRect.Width + 1) % 2); 2528if (textBounds.Width > 1 && textBounds.Height > 1) 2557if (focusBounds.Width > 0 && focusBounds.Height > 0) 2596if (textBounds.Width > 0 && textBounds.Height > 0)
winforms\Managed\System\WinForms\DataGridViewHeaderCell.cs (1)
493rectThemeMargins.Y + rectThemeMargins.Width + rectThemeMargins.Height == 0)
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (15)
476int borderAndPaddingWidths = borderWidthsRect.Left + borderWidthsRect.Width + cellStyle.Padding.Horizontal; 647if (imgWidth * bounds.Height < imgHeight * bounds.Width) 655imgBounds = new Rectangle(bounds.X, bounds.Y, bounds.Width, Decimal.ToInt32((decimal)imgHeight * bounds.Width / imgWidth)); 671imgBounds.X = bounds.Right - imgBounds.Width; 677imgBounds.X = bounds.Right - imgBounds.Width; 683imgBounds.X = bounds.Right - imgBounds.Width; 695imgBounds.X = bounds.Right - imgBounds.Width; 701imgBounds.X = bounds.Right - imgBounds.Width; 707imgBounds.X = bounds.Right - imgBounds.Width; 717imgBounds.X = bounds.X + (bounds.Width - imgBounds.Width) / 2; 823if (valBounds.Width > 0 && valBounds.Height > 0 && (paint || computeContentBounds)) 843if (imgBounds.Width > 0 && imgBounds.Height > 0) 973Debug.Assert(valBounds.Height <= 0 || valBounds.Width <= 0);
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (4)
663int borderAndPaddingWidths = borderWidthsRect.Left + borderWidthsRect.Width + cellStyle.Padding.Horizontal; 1061if (valBounds.Width > 0 && valBounds.Height > 0) 1117errorBounds.Width > 0 && 1143valBounds.Width > 0 &&
winforms\Managed\System\WinForms\DataGridViewMethods.cs (104)
555if (this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) > this.layout.Data.Width) 563int availableWidth = this.layout.Data.Width; // Width available for auto-filled columns 608int maximumPossibleWidth = this.layout.Data.Width - imposedWidthSum; 756int maximumPossibleWidth = this.layout.Data.Width - imposedWidthSum; 932Debug.Assert(this.layout.Data.Width == this.layout.Inside.Width - this.layout.RowHeaders.Width - (this.SingleVerticalBorderAdded ? 1 : 0)); 933int availableWidth = this.layout.Data.Width - imposedWidthSum; 948SystemInformation.VerticalScrollBarWidth <= this.layout.Data.Width) 1741if (this.layout.TopLeftHeader.Width > 0) 1745preferredHeight = this.TopLeftHeaderCell.GetPreferredHeight(-1, this.layout.TopLeftHeader.Width); 1814if (this.layout.TopLeftHeader.Width > 0) 1818preferredHeight = this.TopLeftHeaderCell.GetPreferredHeight(-1, this.layout.TopLeftHeader.Width); 2014if (this.layout.TopLeftHeader.Width > 0) 2187if (this.layout.TopLeftHeader.Width > 0) 2462if (this.layout.TopLeftHeader.Width > 0) 2492cursorClip.X += cursorClip.Width - frozenWidth; 2494cursorClip.Width = Math.Min(frozenWidth, this.layout.Data.Width); 2503else if (this.layout.Data.Width > frozenWidth + scrollingWidth) 2505cursorClip.X += this.layout.Data.Width - frozenWidth - scrollingWidth; 2507cursorClip.Width = Math.Min(scrollingWidth, this.layout.Data.Width); 2776if (this.layout.TopLeftHeader.Width > 0) 3016if (this.layout.TopLeftHeader.Width > 0) 3027r.X = Math.Min(r.X, inside.Right - r.Width); 3032r.X = Math.Min(inside.Right - r.Width, r.X); 3057Rectangle r = new Rectangle(inside.X, mouseY + this.mouseBarOffset - 1, inside.Width, 3); 4188if (this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) >= this.layout.Data.Width) 4332if (this.normalClientRectangle.Width > 0 || this.normalClientRectangle.Height > 0) 4347if (inside.Width < 0) 4372rowHeaders.Width = Math.Min(this.rowHeadersWidth, rowHeaders.Width); 4375rowHeaders.X += insideLeft.Width - rowHeaders.Width; 4379insideLeft.X += rowHeaders.Width; 4381insideLeft.Width -= rowHeaders.Width; 4382Debug.Assert(insideLeft.Width >= 0); 4390topLeft.Width = Math.Min(this.rowHeadersWidth, topLeft.Width); 4391colHeaders.Width -= topLeft.Width; 4394topLeft.X += insideLeft.Width; 4398colHeaders.X += topLeft.Width; 4400Debug.Assert(colHeaders.Width >= 0); 4422if (insideLeft.Width > 0) 4442Debug.Assert(newLayout.Data.Width >= 0); 4558int displayWidth = this.layout.Data.Width, cx = 0; 5531int cxMax = this.layout.Data.Width, cx = 0; 5771SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5772SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5774SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X + r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5791SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 8646int emptyBackgroundWidth = Math.Max(0, this.layout.Data.Width - this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible)); 9183data.Width, 9187rowRect.Width += this.layout.RowHeaders.Width; 9190rowRect.X -= this.layout.RowHeaders.Width; 10193Invalidate(new Rectangle(data.X, top, data.Width, bottom - top)); 10349totalVisibleWidth > this.layout.Data.Width && totalVisibleFrozenWidth < this.layout.Data.Width && 10356if (totalVisibleWidth - this.layout.Data.Width <= vertScrollBarWidth || 10357this.layout.Data.Width - totalVisibleFrozenWidth <= vertScrollBarWidth) 10366needHorizScrollbar = (totalVisibleFrozenWidth < this.layout.Data.Width - vertScrollBarWidth); 10394vertScrollBarWidth <= this.layout.Data.Width) 10397Debug.Assert(this.layout.Data.Width >= 0); 10405Debug.Assert(this.layout.ColumnHeaders.Width >= 0); 10420totalVisibleWidth > this.layout.Data.Width && totalVisibleFrozenWidth < this.layout.Data.Width && 10446vertScrollBarWidth <= this.layout.Data.Width) 10449Debug.Assert(this.layout.Data.Width >= 0); 10457Debug.Assert(this.layout.ColumnHeaders.Width >= 0); 10487int widthNotVisible = totalVisibleWidth - this.layout.Data.Width; 10496rightToLeftInternal ? this.layout.Inside.X + this.layout.ResizeBoxRect.Width : this.layout.Inside.X, 10498this.layout.Inside.Width - this.layout.ResizeBoxRect.Width, 14960if (rightArea.Width > 0 && rightArea.Height > 0) 14972if (rightArea.Width > 0 && rightArea.Height > 0) 17276edge.X += rect.Width - 1; 17880right = new Rectangle(oldClientRectangle.X + oldClientRectangle.Width - borderWidth, 17886oldClientRectangle.Width, 17899if (newClientRectangle.Width != oldClientRectangle.Width) 17902right = new Rectangle(newClientRectangle.X + newClientRectangle.Width - borderWidth, 17913newClientRectangle.Width, 17921right = new Rectangle(oldGridFocusRectangle.X + oldGridFocusRectangle.Width - 1, 17929oldGridFocusRectangle.Width, 19784if (rcBelowRows.Width > 0 && rcBelowRows.Height > 0) 19799rcNextRows.X += this.layout.RowHeaders.Width; 19801rcNextRows.Width -= this.layout.RowHeaders.Width; 19822if (rcNextRows.Width > 0 && rcNextRows.Height > 0) 19839Rectangle edge = new Rectangle(0, 0, bounds.Width, borderWidth); 19856edge.X = bounds.Width - borderWidth; 19869g.DrawRectangle(pen, new Rectangle(0, 0, bounds.Width - 1, bounds.Height - 1)); 19879g.DrawRectangle(pen, new Rectangle(0, 0, bounds.Width - 1, bounds.Height - 1)); 19912Debug.Assert(cellBounds.Width > 0); 19915cellBounds.X = bandBounds.Right - cx - cellBounds.Width; 19945cx += cellBounds.Width; 19946if (cx >= bandBounds.Width) 19963if (this.displayedBandsInfo.FirstDisplayedScrollingCol >= 0 && cx < scrollingBounds.Width) 19989Debug.Assert(cellBounds.Width > 0); 19992cellBounds.X = scrollingBounds.Right - cx - cellBounds.Width; 20018cx += cellBounds.Width; 20019if (cx >= scrollingBounds.Width) 20046if (this.layout.TopLeftHeader.Width > 0 && 20353if (editingZone.Width == 0 || editingZone.Height == 0) 20378editingZone.Width = Math.Max(0, editingZone.Width - totalVisibleFrozenWidth); 20387if (cellClip.Width == 0 || cellClip.Height == 0) 26470NativeMethods.RECT scrollArea = NativeMethods.RECT.FromXYWH(rowsRect.X, rowsRect.Y, rowsRect.Width, rowsRect.Height); 26476rowsRect.Width = this.layout.RowHeaders.Width;
winforms\Managed\System\WinForms\DataGridViewRow.cs (11)
1624Debug.Assert(cellBounds.Width > 0); 1627cellBounds.X = rowBounds.Right - cx - cellBounds.Width; 1664cx += cellBounds.Width; 1665if (cx >= rowBounds.Width) 1677if (cx < dataBounds.Width) 1711Debug.Assert(cellBounds.Width > 0); 1714cellBounds.X = dataBounds.Right - cx - cellBounds.Width; 1751cx += cellBounds.Width; 1752if (cx >= dataBounds.Width) 1799Debug.Assert(cellBounds.Width > 0); 1802cellBounds.X = rowBounds.Right - cellBounds.Width;
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (17)
665int borderAndPaddingWidths = borderWidthsRect.Left + borderWidthsRect.Width + cellStyle.Padding.Horizontal; 677borderAndPaddingHeights += rectThemeMargins.Width; 809if (backgroundBounds.Width > 0 && backgroundBounds.Height > 0) 834using (Bitmap bmFlipXPThemes = new Bitmap(backgroundBounds.Height, backgroundBounds.Width)) { 836DataGridViewRowHeaderCellRenderer.DrawHeader(gFlip, new Rectangle(0, 0, backgroundBounds.Height, backgroundBounds.Width), state); 841new Rectangle(0, 0, backgroundBounds.Width, backgroundBounds.Height), 857valBounds.Height -= rectThemeMargins.X + rectThemeMargins.Width; 864if (valBounds.Width > 0 && valBounds.Height > 0) 890if (valBounds.Width > 0 && valBounds.Height > 0) 897if (valBounds.Width >= iconsWidth + 964Debug.Assert(valBounds.Width >= 0); 972if (valBounds.Width > 0 && valBounds.Height > 0) 975if (this.DataGridView.ShowRowErrors && valBounds.Width > iconsWidth + 2 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth) 978Size maxBounds = new Size(valBounds.Width - iconsWidth - 2 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth, valBounds.Height); 1025if (errorBounds.Width >= 3 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth + 1045if (valBounds.Width >= iconsWidth + 2 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth && 1107if (errorBounds.Width >= 3 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth +
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (11)
196int originalWidth = editingControlBounds.Width; 208editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetLeft - 2); 213editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetLeft - 1); 221editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - 3); 231editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetRight); 236editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetRight - 1); 438int borderAndPaddingWidths = borderWidthsRect.Left + borderWidthsRect.Width + cellStyle.Padding.Horizontal; 717if (paint && DataGridViewCell.PaintBackground(paintParts) && br.Color.A == 255 && valBounds.Width > 0 && valBounds.Height > 0) 742valBounds.Width > 0 && 759if (valBounds.Width > 0 && valBounds.Height > 0) 825this.DataGridView.EditingControl.Size = new Size(editingControlBounds.Width, editingControlBounds.Height);
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (2)
184int borderAndPaddingWidths = borderWidthsRect.Left + borderWidthsRect.Width + cellStyle.Padding.Horizontal; 339if (valBounds.Width > 0 &&
winforms\Managed\System\WinForms\DataGridViewUtilities.cs (5)
324if (sizeRequired.Width > cellBounds.Width) 330Size sizeCell = new Size(cellBounds.Width, cellBounds.Height); 394ptTextLocation.X = cellBounds.X + (cellBounds.Width - sizeText.Width) / 2; 409ptTextLocation.X = cellBounds.X + (cellBounds.Width - sizeText.Width) / 2; 424ptTextLocation.X = cellBounds.X + (cellBounds.Width - sizeText.Width) / 2;
winforms\Managed\System\WinForms\DateTimePicker.cs (1)
1193int width = CommonProperties.GetSpecifiedBounds(this).Width;
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (4)
272pageHostBounds.Width, STRIP_HEIGHT); 275Rectangle pageBounds = new Rectangle(0, 0, pageHostBounds.Width, pageHostBounds.Height); 284Size size = new Size(bounds.Width + 3 * (BUTTON_PAD + xFrame) + selectorWidth, 292bounds.X = bounds.Width + bounds.X - BUTTON_WIDTH;
winforms\Managed\System\WinForms\ErrorProvider.cs (6)
998windowBounds.Width, 1068CreateMirrorDC(hdc, windowBounds.Width - 1); 1074SafeNativeMethods.DrawIconEx(new HandleRef(this, mirrordc.Hdc), bounds.X - windowBounds.X, bounds.Y - windowBounds.Y, new HandleRef(provider.Region, provider.Region.IconHandle), bounds.Width, bounds.Height, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL); 1226toolInfo.rect = NativeMethods.RECT.FromXYWH(iconBounds.X, iconBounds.Y, iconBounds.Width, iconBounds.Height); 1246CreateMirrorDC(dc.Hdc, windowBounds.Width); 1279windowBounds.Width, windowBounds.Height, NativeMethods.SWP_NOACTIVATE);
winforms\Managed\System\WinForms\Form.cs (13)
1174SetDesktopBounds(value.X, value.Y, value.Width, value.Height); 2206if (restoreBounds.Width == -1 3442if (correctClientSize.Width != currentClient.Width) { 4023cp.X = Math.Max(clientRect.X,clientRect.X + (clientRect.Width - cp.Width)/2); 4039cp.X = Math.Max(screenRect.X,screenRect.X + (screenRect.Width - cp.Width)/2); 4463else if (p.X + s.Width > screenRect.X + screenRect.Width) 4464p.X = screenRect.X + screenRect.Width - s.Width; 4507p.X = Math.Max(screenRect.X,screenRect.X + (screenRect.Width - Width)/2); 5685formStateEx[FormStateExWindowBoundsWidthIsClientSize]==1 ? restoredSize.Width : restoredWindowBounds.Width, 5890if ((specified & BoundsSpecified.Width) != 0 || restoreBounds.Width == -1) 5939base.SetBoundsCore(adjustedBounds.X, adjustedBounds.Y, adjustedBounds.Width, adjustedBounds.Height, BoundsSpecified.All); 7219mmi.ptMaxSize.x = maximizedBounds.Width; 7858toolInfo.rect = NativeMethods.RECT.FromXYWH(r.X, r.Y, r.Width, r.Height);
winforms\Managed\System\WinForms\GroupBox.cs (3)
576textSize = Size.Ceiling(graphics.MeasureString(Text, Font, textRectangle.Width, format)); 602textSize = wg.MeasureText(Text, wfont, new Size(textRectangle.Width , int.MaxValue), flags ); 618textLeft += textRectangle.Width - textSize.Width;
winforms\Managed\System\WinForms\GroupBoxRenderer.cs (25)
171Size measuredBounds = TextRenderer.MeasureText(g, groupBoxText, font, new Size(textBounds.Width, textBounds.Height), flags); 176textBounds.X = bounds.Right - textBounds.Width - boxHeaderWidth + 1; // +1 to account for the margin built in the MeasureText result 195clipMiddle.Width = Math.Max(0, textBounds.Width - 3); // -3 to account for the margin built in the MeasureText result 199clipMiddle.X = clipLeft.Left - clipMiddle.Width; 233g.DrawLine(light, bounds.Left, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1); 234g.DrawLine(dark, bounds.Left, bounds.Height - 2, bounds.Width - 1, bounds.Height - 2); 237g.DrawLine(light, bounds.Left + 1, bounds.Top + 1, bounds.Width - 1, bounds.Top + 1); 238g.DrawLine(dark, bounds.Left, bounds.Top, bounds.Width - 2, bounds.Top); 241g.DrawLine(light, bounds.Width - 1, bounds.Top, bounds.Width - 1, bounds.Height - 1); 242g.DrawLine(dark, bounds.Width - 2, bounds.Top, bounds.Width - 2, bounds.Height - 2); 264Size measuredBounds = TextRenderer.MeasureText(g, groupBoxText, font, new Size(textBounds.Width, textBounds.Height), flags); 269textBounds.X = bounds.Right - textBounds.Width - textOffset; 278if (textBounds.Width > 0) 291g.DrawLine(light, bounds.Left, bounds.Height - 1, bounds.Width, bounds.Height - 1); 292g.DrawLine(dark, bounds.Left, bounds.Height - 2, bounds.Width - 1, bounds.Height - 2); 299g.DrawLine(light, textBounds.X + textBounds.Width + 1, boxTop, bounds.Width - 1, boxTop); 300g.DrawLine(dark, textBounds.X + textBounds.Width + 2, boxTop - 1, bounds.Width - 2, boxTop - 1); 303g.DrawLine(light, bounds.Width - 1, boxTop, bounds.Width - 1, bounds.Height - 1); 304g.DrawLine(dark, bounds.Width - 2, boxTop - 1, bounds.Width - 2, bounds.Height - 2);
winforms\Managed\System\WinForms\HScrollProperties.cs (1)
35return ParentControl.ClientRectangle.Width;
winforms\Managed\System\WinForms\Label.cs (4)
1093xLoc = (r.X+r.Width - 4)-pointImageSize.Width; 1096xLoc = r.X + (r.Width - pointImageSize.Width)/2; 1538Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height)); 1539showToolTip = (clientRect.Width < preferredSize.Width || clientRect.Height < preferredSize.Height);
winforms\Managed\System\WinForms\Layout\CommonProperties.cs (3)
214bounds.Width = Math.Min(bounds.Width, value.Width); 236bounds.Width = Math.Max(bounds.Width, value.Width); 281bool wChangedButNotSpecified = ((specified & BoundsSpecified.Width) == BoundsSpecified.None) & width != originalBounds.Width;
winforms\Managed\System\WinForms\Layout\DockAndAnchorLayout.cs (23)
42proposedConstraints.Width = bounds.Width; 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; 152right += displayRect.Width; 156left += displayRect.Width; 161right += (displayRect.Width / 2); 162left += (displayRect.Width / 2); 193if (right < left || cachedBounds.Width != element.Bounds.Width || cachedBounds.X != element.Bounds.X) { 197right = left + Math.Max(element.Bounds.Width, cachedBounds.Width) + Math.Abs(right); 234if (CommonProperties.GetAutoSize(container) && ((displayRectangle.Width == 0) || (displayRectangle.Height == 0))) { 305remainingBounds.X += element.Bounds.Width; 306remainingBounds.Width -= element.Bounds.Width; 316remainingBounds.Width -= element.Bounds.Width; 350Math.Max(0, newElementBounds.Width - remainingBounds.Width), 570int parentWidth = parentDisplayRect.Width; 586anchorInfo.Left = oldAnchorInfo.Right - bounds.Width; // control might have been resized, update Left anchor 735if ((displayRectangle.Width == 0) || (displayRectangle.Height == 0)) { 850if (anchorDest.Width < 0) { 851prefSize.Width = Math.Max(prefSize.Width, elementSpace.Right + anchorDest.Width);
winforms\Managed\System\WinForms\Layout\FlowLayout.cs (3)
119Rectangle measureBounds = new Rectangle(displayRect.X, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height); 190elementConstraints.Width = rowBounds.Width - rowSize.Width - elementProxy.Margin.Size.Width; 420newBounds.X = DisplayRect.Right - bounds.X - bounds.Width + ElementProxy.Margin.Left - ElementProxy.Margin.Right;
winforms\Managed\System\WinForms\Layout\LayoutUtils.cs (15)
212if (rect1.X <= rect2.X && rect1.X + rect1.Width >= rect2.X + rect2.Width) { 216if (rect2.X <= rect1.X && rect2.X + rect2.Width >= rect1.X + rect1.Width) { 227if (rect1.Y <= rect2.Y && rect1.Y + rect1.Width >= rect2.Y + rect2.Width) { 231if (rect2.Y <= rect1.Y && rect2.Y + rect2.Width >= rect1.Y + rect1.Width) { 261withinThis.X += withinThis.Width - alignThis.Width; 264withinThis.X += (withinThis.Width - alignThis.Width) / 2; 273withinThis.X += withinThis.Width - alignThis.Width; 276withinThis.X += (withinThis.Width - alignThis.Width) / 2; 425return (rectangle.Width == 0 || rectangle.Height == 0); 445region1.X += bounds.Width - specifiedContent.Width; 523bounds.X = withinBounds.Width - bounds.Right;
winforms\Managed\System\WinForms\Layout\TableLayout.cs (3)
1229cellBounds.Width = Math.Max(cellBounds.Width, 1); 1238elementBounds.Width = Math.Min(cellBounds.Width, elementBounds.Width);
winforms\Managed\System\WinForms\LinkLabel.cs (10)
508xLoc = clientRect.Right - textRect.Width; 510xLoc = (clientRect.Width - textRect.Width) / 2; 524if (textRect.Width > clientRect.Width) { 526width = clientRect.Width; 528width = textRect.Width; 678Size clientSize = new Size(clientRectWithPadding.Width, clientRectWithPadding.Height); 1145Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height)); 1146showToolTip = (clientRect.Width < preferredSize.Width || clientRect.Height < preferredSize.Height);
winforms\Managed\System\WinForms\ListBox.cs (2)
2333bounds.Width = Math.Max(ColumnWidth, bounds.Width); 2336bounds.Width = Math.Max(MaxItemWidth, bounds.Width);
winforms\Managed\System\WinForms\MDIClient.cs (3)
214int sw = (int)Math.Round((bounds.X + bounds.Width) * dx - sx); 298rgn1 = SafeNativeMethods.CreateRectRgn(0, 0, bounds.Width, bounds.Height); 301bounds.Width - rect.right, bounds.Height - rect.bottom);
winforms\Managed\System\WinForms\MonthCalendar.cs (1)
1959if (width != oldBounds.Width) {
winforms\Managed\System\WinForms\NativeMethods.cs (1)
6475this.width = r.Width;
winforms\Managed\System\WinForms\PictureBox.cs (4)
455result.X += (result.Width - image.Width) / 2; 462float ratio = Math.Min((float)ClientRectangle.Width / (float)imageSize.Width, (float)ClientRectangle.Height / (float)imageSize.Height); 465result.X = (ClientRectangle.Width - result.Width) /2;
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (1)
749NativeMethods.RECT scroll = NativeMethods.RECT.FromXYWH(rect.X, rect.Y, rect.Width, rect.Height);
winforms\Managed\System\WinForms\Printing\PrintPreviewDialog.cs (1)
1734Rectangle rect = new Rectangle (0, 0 , item.Bounds.Width - 1, item.Bounds.Height - 1);
winforms\Managed\System\WinForms\PropertyGrid.cs (3)
2346if (rc.Width < rc.Height) { 2347for (int i = 0; i < rc.Width; i++) { 2353ControlPaint.DrawReversibleLine(new Point(rc.X, rc.Y+i), new Point(rc.X+rc.Width, rc.Y+i), ctlDrawTo.BackColor);
winforms\Managed\System\WinForms\PropertyGridInternal\CategoryGridEntry.cs (2)
229g.DrawLine(topLinePen, rect.X - 1, rect.Y - 1, rect.Width + 2, rect.Y - 1); 240g.DrawLine(topLinePen, rect.X - 2, rect.Y - 1, rect.Width + 1, rect.Y - 1);
winforms\Managed\System\WinForms\PropertyGridInternal\DocComment.cs (7)
118if (!rect.IsEmpty && newRect.Width > rect.Width) { 119Rectangle rectInvalidate = new Rectangle(rect.Width-1,0,newRect.Width-rect.Width+1,rect.Height); 124if (ClientRectangle.Width != rect.Width || ClientRectangle.Height != rect.Height) {
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (10)
1884if (paintFullLabel && (neededWidth >= (rect.Width-(stringX+2)))) { 1907g.FillRectangle(blank, rect.X, rect.Y, rect.Width, rect.Height); 1915g.FillRectangle(gridHost.GetSelectedItemWithFocusBackBrush(g), stringX, rect.Y, rect.Width - stringX - 1, rect.Height); 1918int maxSpace = Math.Min(rect.Width-stringX-1, labelWidth + PropertyGridView.GDIPLUS_SPACE); 2063g.DrawRectangle(p, outline.X, outline.Y, outline.Width - 1, outline.Height - 1); 2068outline.X + outline.Width - indent - 1,outline.Y + outline.Height/2); 2072g.DrawLine(p, outline.X + outline.Width/2, outline.Y + indent, 2073outline.X + outline.Width/2, outline.Y + outline.Height - indent - 1); 2175if (textWidth >= rect.Width || GetMultipleLines(strValue)) 2199IntNativeMethods.RECT lpRect = IntNativeMethods.RECT.FromXYWH(rect.X + (int)m.OffsetX + 2, rect.Y + (int)m.OffsetY - 1, rect.Width - 4, rect.Height);
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (2)
180NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(itemRect.X, itemRect.Y, itemRect.Width, itemRect.Height); 189int overHang = (Location.X + Size.Width) - SystemInformation.VirtualScreen.Width;
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (23)
558return new Point(pt.X + (rect.Width / 2), pt.Y + (rect.Height / 2)); 793return new Rectangle(pt.x, pt.y, rect.Width, rect.Height); 1061rectTarget.Width,rectTarget.Height); 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)); 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)); 2223Size sizeWindow = new Size(rect.Width,rect.Height); 2227boundsScroll.X = sizeWindow.Width - boundsScroll.Width - 1; 3782if (!lastClientRect.IsEmpty && newRect.Width > lastClientRect.Width) { 3783Rectangle rectInvalidate = new Rectangle(lastClientRect.Width-1,0,newRect.Width-lastClientRect.Width+1,lastClientRect.Height); 3788Rectangle rectInvalidate = new Rectangle(0,lastClientRect.Height-1,lastClientRect.Width,newRect.Height-lastClientRect.Height+1); 3908DropDownListBox.Width = Math.Max(maxWidth, GetRectangle(row,ROWVALUE).Width); 4083if (gridentry.OutlineRect.Height != outlineRectIconSize || gridentry.OutlineRect.Width != outlineRectIconSize) { 4428Rectangle rectTarget = new Rectangle(rect.X+rect.Width-sizeBtn.Width, 5860if ((dragBaseRect.Width - delta) > MinDropDownSize.Width) 5863newBounds.Width = dragBaseRect.Width - delta; 6721ClientRectangle.Width <= psheet.SelectedGridEntry.GetValueTextWidth(this.Text, g, this.Font)) {
winforms\Managed\System\WinForms\Screen.cs (1)
328NativeMethods.RECT rc = NativeMethods.RECT.FromXYWH(rect.X, rect.Y, rect.Width, rect.Height);
winforms\Managed\System\WinForms\ScrollableControl.cs (26)
270rect.Width = displayRect.Width; 288displayRectangle.Width = Math.Max(displayRectangle.Width, AutoScrollMinSize.Width); 407display.Width = client.Width; 443int maxX = minClient.Width; 557int ctlRight = -display.X + bounds.X + bounds.Width + scrollMargin.Width; 584if (maxX <= fullClient.Width) { 600if (needVscroll && maxX > clientToBe.Width) { 604maxX = clientToBe.Width; 647displayRect = new Rectangle(displayRect.X, displayRect.Y, this.displayRect.Width, this.VerticalScroll.Maximum); 726int maxPos = -(client.Width - displayRect.Width); 847int minX = Math.Min(client.Width - displayRectangle.Width, 0); 876NativeMethods.RECT rcClip = NativeMethods.RECT.FromXYWH(cr.X, cr.Y, cr.Width, cr.Height); 877NativeMethods.RECT rcUpdate = NativeMethods.RECT.FromXYWH(cr.X, cr.Y, cr.Width, cr.Height); 915&& (client.Width > 0 && client.Height > 0)) { 961else if (bounds.X + bounds.Width + xMargin > client.Width) { 963xCalc = client.Width - (bounds.X + bounds.Width + xMargin - displayRect.X); 1132if (displayRect.Width != width 1140int minX = ClientRectangle.Width - width; 1233HorizontalScroll.maximum = displayRect.Width-1; 1236HorizontalScroll.largeChange = ClientRectangle.Width; 1394int maxPos = -(client.Width - displayRect.Width);
winforms\Managed\System\WinForms\SplitContainer.cs (6)
858OnSplitterMoved(new SplitterEventArgs(SplitterRectangle.X + SplitterRectangle.Width/2, SplitterRectangle.Y + SplitterRectangle.Height/2, SplitterRectangle.X, SplitterRectangle.Y)); 1182SplitterCancelEventArgs se = new SplitterCancelEventArgs(this.Left + SplitterRectangle.X + SplitterRectangle.Width/2, this.Top + SplitterRectangle.Y + SplitterRectangle.Height/2, xSplit, ySplit); 1553if (r.Width < minWeight) { 1570if (r.Width < minWeight) { 1639SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 2383return new Rectangle(containerRectangle.X + splitterRectangle.X, containerRectangle.Y + splitterRectangle.Y, splitterRectangle.Width, splitterRectangle.Height);
winforms\Managed\System\WinForms\Splitter.cs (9)
463bounds.X += bounds.Width - splitSize; 469OnSplitterMoved(new SplitterEventArgs(Left, Top, (Left + bounds.Width / 2), (Top + bounds.Height / 2))); 676if (r.Width < minWeight) r.Width = minWeight; 680if (r.Width < minWeight) r.Width = minWeight; 681r.X = bounds.X + bounds.Width - splitSize - r.Width; 702return r.Width; 721initTargetSize = target.Bounds.Width; 776SafeNativeMethods.PatBlt(new HandleRef(ParentInternal, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT);
winforms\Managed\System\WinForms\StatusBar.cs (3)
900int leftoverWidth = rect.Width - barPanelWidth; 1110if (x > bounds.X + bounds.Width - SizeGripWidth) { 1888ti.rect = NativeMethods.RECT.FromXYWH(tool.rect.X, tool.rect.Y, tool.rect.Width, tool.rect.Height);
winforms\Managed\System\WinForms\StatusStrip.cs (2)
402else if (item.Bounds.Width == 1) { 537TableLayoutSettings.ColumnStyles[0].Width = Math.Max(0,this.DisplayRectangle.Width);
winforms\Managed\System\WinForms\TabControl.cs (1)
414NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(bounds.X, bounds.Y, bounds.Width, bounds.Height);
winforms\Managed\System\WinForms\TableLayoutPanel.cs (6)
439Rectangle insideCellBounds = new Rectangle(outsideCellBounds.X + (cellBorderWidth + 1) / 2, outsideCellBounds.Y + (cellBorderWidth + 1)/ 2, outsideCellBounds.Width - (cellBorderWidth + 1) / 2, outsideCellBounds.Height - (cellBorderWidth + 1) / 2); 464Rectangle tableBounds = new Rectangle(cellBorderWidth/2 + displayRect.X, cellBorderWidth/2 + displayRect.Y, displayRect.Width - cellBorderWidth, displayRect.Height - cellBorderWidth); 469g.DrawLine(SystemPens.ControlDark, tableBounds.X, tableBounds.Y + tableBounds.Height - 1, tableBounds.X + tableBounds.Width - 1, tableBounds.Y + tableBounds.Height - 1); 473g.DrawLine(pen, tableBounds.X + tableBounds.Width - 1, tableBounds.Y, tableBounds.X + tableBounds.Width - 1, tableBounds.Y + tableBounds.Height - 1); 474g.DrawLine(pen, tableBounds.X, tableBounds.Y + tableBounds.Height - 1, tableBounds.X + tableBounds.Width - 1, tableBounds.Y + tableBounds.Height - 1);
winforms\Managed\System\WinForms\TabPage.cs (2)
718Rectangle rectWithBorder = new Rectangle(inflateRect.X - 4, inflateRect.Y - 2, inflateRect.Width + 8, inflateRect.Height + 6); 747base.SetBoundsCore (r.X, r.Y, r.Width, r.Height, specified == BoundsSpecified.None ? BoundsSpecified.None : BoundsSpecified.All);
winforms\Managed\System\WinForms\ToolStrip.cs (8)
269CommonProperties.UpdateSpecifiedBounds(this, bounds.X, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location); 2515maxSize.Width += overflowItemMargin.Horizontal + overflowItem.Bounds.Width; 2839using (Bitmap image = new Bitmap(bounds.Width, bounds.Height)) 2848SafeNativeMethods.BitBlt(new HandleRef(this, desthDC), bounds.X, bounds.Y, bounds.Width, bounds.Height, 4296gripRectangle.X = ClientRectangle.Right - gripRectangle.Width - Grip.Margin.Horizontal; 4307gripRectangle.Width = displayRect.Width; 4783SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified); 5544int widthUnit = orig.Width / 2;
winforms\Managed\System\WinForms\ToolStripComboBox.cs (2)
736Point middle = new Point(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 739middle.X += (dropDownRect.Width % 2);
winforms\Managed\System\WinForms\ToolStripControlHost.cs (3)
58CommonProperties.UpdateSpecifiedBounds(c, bounds.X, bounds.Y, bounds.Width, bounds.Height); 475CommonProperties.UpdateSpecifiedBounds(control, specifiedBounds.X, specifiedBounds.Y, specifiedBounds.Width, specifiedBounds.Height); 485CommonProperties.UpdateSpecifiedBounds(control, bounds.X, bounds.Y, bounds.Width, bounds.Height);
winforms\Managed\System\WinForms\ToolStripDropDown.cs (5)
1251offset.X = - dropDownBounds.Width; 1262offset.X = - dropDownBounds.Width; 1444SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location); 1761base.SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified); 1988if (bounds.Width > 0 && bounds.Height >0) {
winforms\Managed\System\WinForms\ToolStripDropDownButton.cs (2)
260preferredSize.Width += DropDownArrowRect.Width + scaledDropDownArrowPadding.Horizontal; 300dropDownArrowRect = new Rectangle(0,options.client.Bottom + scaledDropDownArrowPadding.Top, ownerItem.Bounds.Width-1, dropDownArrowSize.Height);
winforms\Managed\System\WinForms\ToolStripDropDownItem.cs (8)
126if (intersectionBetweenChildAndParent.Width >= 2) { 131int newIntersectionWidth = Rectangle.Intersect(GetDropDownBounds(newDropDownDirection), ownerItemBounds).Width; 132if (newIntersectionWidth < intersectionBetweenChildAndParent.Width) { 315offset.X = -dropDownBounds.Width + this.Width; 325offset.X = -dropDownBounds.Width + this.Width; 337offset.X = -dropDownBounds.Width; 394if (Rectangle.Intersect(dropDownBounds, itemScreenBounds).Width > 1) { 399if (Rectangle.Intersect(dropDownBounds, itemScreenBounds).Width > 1) {
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (3)
123int padding = (ShowCheckMargin || ShowImageMargin) ? textPadding + ImageMargin.Width : textPadding; 379maxNonMenuItemSize.Width = Math.Max(item.Bounds.Width, maxNonMenuItemSize.Width); 485int trimPadding = imageMarginBounds.Width;
winforms\Managed\System\WinForms\ToolStripHighContrastRenderer.cs (20)
57 int height = (toolStrip.Orientation == Orientation.Horizontal) ? bounds.Height : bounds.Width; 58 int width = (toolStrip.Orientation == Orientation.Horizontal) ? bounds.Width : bounds.Height; 145 g.DrawRectangle(SystemPens.ButtonHighlight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 150 g.DrawRectangle(SystemPens.ButtonHighlight, bounds.X, bounds.Y, bounds.Width-1, bounds.Height -1); 233 g.DrawRectangle(SystemPens.ButtonHighlight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 245 g.DrawRectangle(SystemPens.ButtonShadow, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 262 bool oddWidth = ((bounds.Width & 0x1) == 0x1); 267 g.DrawLine(p, bounds.X + indent, bounds.Y, bounds.Width - 1, bounds.Y); 269 g.DrawLine(p, bounds.X + indent, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1); 274 g.DrawLine(p, bounds.Width - 1, bounds.Y + indent, bounds.Width - 1, bounds.Height - 1); 283 g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, 1, 1, 1)); 295 g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, bounds.Height - 2, 1, 1)); 321 int startX = bounds.Width / 2; 329 if (bounds.Width >= 4) { 379 g.DrawImage(image, imageRect, 0, 0, imageRect.Width, imageRect.Height, GraphicsUnit.Pixel, attrs); 399g.DrawRectangle(SystemPens.Highlight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 402g.DrawRectangle(SystemPens.ControlLight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 427 g.DrawRectangle(SystemPens.ControlLight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 432 g.DrawRectangle(SystemPens.ControlLight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
winforms\Managed\System\WinForms\ToolStripItem.cs (2)
1120SetBounds(currentBounds.X, currentBounds.Y, currentBounds.Width, value); 2446return Bounds.Width;
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (1)
1091if (checkRectangle.Width != 0) {
winforms\Managed\System\WinForms\ToolStripOverflow.cs (1)
101SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified);
winforms\Managed\System\WinForms\ToolStripPanel.cs (4)
590controlLocations[j] = new Point(row.Bounds.Width - control.Right, control.Top); 1145cursorLoc.X += toolStripToDrag.GripRectangle.Width /2; 1208if (Orientation == Orientation.Horizontal && (bounds.Width == 0)) { 1209bounds.Width = ParentInternal.DisplayRectangle.Width;
winforms\Managed\System\WinForms\ToolStripPanelCell.cs (2)
241constrainingSize.Width = ToolStripPanelRow.Bounds.Width; 271if (spaceToFree > 0 && bounds.Width > spaceToFree) {
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (13)
448if (cachedBounds.Width > minSize.Width) { 449spaceToFree -= (cachedBounds.Width - minSize.Width); 458cellOffsets[j] += Math.Max(0,currentCell.CachedBounds.Width-cachedBounds.Width); 672preferredSize.Width = DisplayRectangle.Width; 945displayRect.Width = ToolStripPanel.ParentInternal.DisplayRectangle.Width - (ToolStripPanel.Margin.Horizontal + ToolStripPanel.Padding.Horizontal) - Row.Margin.Horizontal; 948displayRect.Width = raftingDisplayRectangle.Width - Row.Margin.Horizontal; 996return totalSize.Width < DisplayRectangle.Width; 1175freedSpace += DisplayRectangle.Width; 1245int spaceOccupiedByCell = cell.Margin.Horizontal + cell.Bounds.Width; 1473int x = previousRowBounds.X + previousRowBounds.Width - (previousRowBounds.Width >> 2); 1482dragBounds.Width += (nextRowBounds.Width >> 2) + Row.Margin.Right + ToolStripPanel.RowsInternal[index + 1].Margin.Left;
winforms\Managed\System\WinForms\ToolStripProfessionalLowResolutionRenderer.cs (7)
48bool oddWidth = ((bounds.Width & 0x1) == 0x1); 53g.DrawLine(p, bounds.X + indent, bounds.Y, bounds.Width - 1, bounds.Y); 55g.DrawLine(p, bounds.X + indent, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1); 60g.DrawLine(p, bounds.Width - 1, bounds.Y + indent, bounds.Width - 1, bounds.Height - 1); 69g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, 1, 1, 1)); 81g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, bounds.Height - 2, 1, 1));
winforms\Managed\System\WinForms\ToolStripProfessionalRenderer.cs (39)
335g.DrawRectangle(p, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 347g.DrawRectangle(p, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 384g.DrawLine(p, bounds.Width - 2, bounds.Height - 2, bounds.Width - 1, bounds.Height - 3); 389g.DrawLine(p, bounds.Width -1, 0,bounds.Width -1, bounds.Height - 1); 392g.DrawLine(p, bounds.Width - 2, bounds.Height - 2, bounds.Width - 1, bounds.Height - 3); 408edging = new Rectangle(bounds.Width - 1, 3, 1, bounds.Height - 3); 411edging = new Rectangle(3, bounds.Height -1, bounds.Width -3, bounds.Height - 1); 437int height = (toolStrip.Orientation == Orientation.Horizontal) ? bounds.Height : bounds.Width; 438int width = (toolStrip.Orientation == Orientation.Horizontal) ? bounds.Width : bounds.Height; 494if ((bounds.Width == 0) || (bounds.Height == 0)) { 523g.DrawRectangle(p, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 566g.DrawRectangle(p, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 742Point topRight = new Point(bounds.Width - 1, 0); 744Point bottomRight = new Point(bounds.Width - 1, bounds.Height - 1); 837if ((bounds.Width == 0) || (bounds.Height == 0)) { 853endGradient.X = bounds.Right - endGradient.Width; 854useDoubleGradient = (bounds.Width > (firstGradientWidth + secondGradientWidth)); 909Rectangle bounds = DpiHelper.IsScalingRequired ? new Rectangle(e.ImageRectangle.Left-2, (e.Item.Height - e.ImageRectangle.Height )/2- 1, e.ImageRectangle.Width+4, e.ImageRectangle.Height +2) : 910new Rectangle(e.ImageRectangle.Left - 2, 1, e.ImageRectangle.Width + 4, e.Item.Height - 2); 921g.DrawRectangle(p, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 931g.DrawRectangle(SystemPens.Highlight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 936if ((bounds.Width == 0) || (bounds.Height == 0)) { 947g.DrawRectangle(p, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1039g.DrawRectangle(p, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1064overflowBoundsFill.X += overflowBoundsFill.Width - overflowButtonWidth + 1; 1133g.FillRectangle(b, overflowBoundsFill.Width - 3, overflowBoundsFill.Top - 1, 1, 1); 1134g.FillRectangle(b, overflowBoundsFill.Width - 2, overflowBoundsFill.Top - 2, 1, 1); 1162Point topRight = new Point(bounds.Width - 1, 0); 1219if ((bounds.Width == 0) || (bounds.Height == 0)) { 1236if ((bounds.Width == 0) || (bounds.Height == 0)) { 1311int startX = bounds.Width / 2; 1324if (isAHorizontalSeparatorNotOnDropDownMenu && bounds.Width >= 4) { 1351if ((bounds.Width == 0) || (bounds.Height == 0)) { 1396g.DrawRectangle(p, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1443Point middle = new Point(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 1446middle.X += (dropDownRect.Width % 2);
winforms\Managed\System\WinForms\ToolStripRenderer.cs (5)
711Point middle = new Point(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 907e.Graphics.DrawImage(image, imageRect, 0, 0, imageRect.Width, 934if (e.TextDirection != ToolStripTextDirection.Horizontal && textRect.Width > 0 && textRect.Height > 0) { 1034baseRect.X = sizeGripBounds.Width - baseRect.X - baseRect.Width;
winforms\Managed\System\WinForms\ToolStripRenderEventArgs.cs (1)
129return new Rectangle(itemBounds.X+1, 0, itemBounds.Width -2, 2);
winforms\Managed\System\WinForms\ToolStripSeparator.cs (1)
420return new Size(parent.Width - (parent.Padding.Horizontal - dropDownMenu.ImageMargin.Width), WINBAR_SEPARATORTHICKNESS);
winforms\Managed\System\WinForms\ToolStripSplitButton.cs (1)
375int splitButtonButtonWidth = Math.Max(0, this.Width - dropDownButtonBounds.Width);
winforms\Managed\System\WinForms\ToolStripSplitStackLayout.cs (6)
127if (currentWidth > displayRectangle.Width - overflowWidth) { 131int spaceRecovered = SendNextItemToOverflow((currentWidth + overflowWidth) - displayRectangle.Width, true); 356else if (alignedRightItems.Width > 0 && alignedLeftItems.Width > 0 && alignedRightItems.IntersectsWith(alignedLeftItems)) { 481else if (alignedRightItems.Width > 0 && alignedLeftItems.Width > 0 && alignedRightItems.IntersectsWith(alignedLeftItems)) {
winforms\Managed\System\WinForms\ToolStripSystemRenderer.cs (8)
241e.Graphics.DrawLine(SystemPens.ButtonHighlight, 0,bounds.Bottom-1,bounds.Width, bounds.Bottom-1); 242e.Graphics.DrawLine(SystemPens.InactiveBorder, 0,bounds.Bottom-2,bounds.Width,bounds.Bottom-2); 245e.Graphics.DrawLine(SystemPens.ButtonHighlight, 0,bounds.Bottom-1,bounds.Width, bounds.Bottom-1); 246e.Graphics.DrawLine(SystemPens.ButtonShadow, 0,bounds.Bottom-2,bounds.Width,bounds.Bottom-2); 288if (bounds.Width >= 4) { 413g.DrawRectangle(p, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 628int startX = bounds.Width / 2; 639if (bounds.Width >= 4) {
winforms\Managed\System\WinForms\ToolStripTextBox.cs (1)
168return new Size(bounds.Width, TextBox.PreferredHeight);
winforms\Managed\System\WinForms\ToolTip.cs (8)
1798int centeredX = toolRectangle.Left + toolRectangle.Width / 2 - width / 2; // tooltip will be aligned with tool vertically 1819locationWeights[i] += Math.Abs((long)intersection.Width * intersection.Height); // Intersection is a weight 1830locationClippedAreas[i] = (Math.Abs((long)possibleLocations[i].Width) - Math.Abs((long)locationAreaWithinScreen.Width)) 1842locationWithinTopControlAreas[i] = Math.Abs((long)locationWithinTopControlRectangle.Height * locationWithinTopControlRectangle.Width); 2337Math.Min(currentTooltipSize.Width-2*XBALLOONOFFSET, screen.WorkingArea.Width): 2338Math.Min(currentTooltipSize.Width, screen.WorkingArea.Width); 2516UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, screen.WorkingArea.Width);
winforms\Managed\System\WinForms\TrackBar.cs (1)
462SetBounds(r.X, r.Y, r.Height, r.Width, BoundsSpecified.All);
winforms\Managed\System\WinForms\TrackBarRenderer.cs (5)
157if (numTicks <= 0 || bounds.Height <= 0 || bounds.Width <= 0 || g == null) { 169float inc = ((float)bounds.Width - lineWidth) / ((float)numTicks - 1); 188if (numTicks<=0 || bounds.Height <= 0 || bounds.Width<=0 || g == null ) { 196visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.X, bounds.Y, bounds.Width, lineWidth), Edges.Top, edgeStyle, EdgeEffects.None); 205visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.X, (int)Math.Round(y), bounds.Width, lineWidth), Edges.Top, edgeStyle, EdgeEffects.None);
winforms\Managed\System\WinForms\Triangle.cs (3)
60int updnWidth =(int)(bounds.Width * TRI_WIDTH_RATIO); 110bounds.X +(bounds.Width - updnHeight)/2, 116bounds.X +(bounds.Width - lrWidth)/2,
winforms\Managed\System\WinForms\UpDownBase.cs (4)
812Rectangle clipTop = new Rectangle(bounds.Left, bounds.Top, bounds.Width, border); 814Rectangle clipBottom = new Rectangle(bounds.Left, bounds.Bottom - border, bounds.Width, border); 1094int totalClientWidth = clientArea.Width; 1107upDownEditBounds.Size = new Size(clientArea.Width - defaultButtonsWidth, clientArea.Height);
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (10)
283if (bounds.Width < 0 || bounds.Height < 0) { 314if (bounds.Width < 0 || bounds.Height < 0) { 317if (clipRectangle.Width < 0 || clipRectangle.Height < 0) { 383if (bounds.Width < 0 || bounds.Height < 0) { 410if (bounds.Width < 0 || bounds.Height < 0) { 445if (bounds.Width < 0 || bounds.Height < 0) { 488if (bounds.Width < 0 || bounds.Height < 0) { 512if (bounds.Width < 0 || bounds.Height < 0) { 536if (contentBounds.Width < 0 || contentBounds.Height < 0) { 564if (bounds.Width < 0 || bounds.Height < 0) {
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (1)
308lprcPosRect.right = this.Host.Bounds.Width + this.Host.Bounds.X;
winforms\Managed\System\WinForms\WinFormsUtils.cs (3)
104bounds.Size = new Size(Math.Min(constrainingBounds.Width -2, bounds.Width), 112bounds.X = constrainingBounds.Right - bounds.Width;
System.Windows.Forms.DataVisualization (51)
Common\General\Legend.cs (10)
476 legendPosition.Width, 513 legendPosition.Width - (this.GetBorderSize() + this._offset.Width) * 2, 531 legendPosition.Width - 2 * (this._offset.Width + this.GetBorderSize()), 2503 if(separatorRect.Width > 0 && separatorRect.Height > 0) 2522 separatorRect.X += separatorRect.Width; 2536 int step = (this._legendItemsAreaPosition.Width / 3) / markerCount; 2541 this._legendItemsAreaPosition.X + this._legendItemsAreaPosition.Width / 2 - step * (float)Math.Floor(markerCount/2f), 4032 this._headerPosition.Width > 0 && 4089 columnWidth += rect.Width; 4093 if(rect.Width > 0 && rect.Height > 0)
Common\General\LegendColumns.cs (32)
1915 if(this.cellPosition.Width <= 0 || this.cellPosition.Height <= 0) 2104 imageCellPosition.Width = imagePosition.Width; 2112 if(newWidth > this.cellPosition.Width) 2114 newWidth = this.cellPosition.Width; 2135 if(imagePosition.Width > imageCellPosition.Width) 2137 scaleValue = Math.Max(scaleValue, (float)imagePosition.Width / (float)imageCellPosition.Width); 2142 imagePosition.Width = (int)(imagePosition.Width / scaleValue); 2145 imagePosition.X = (int)((this.cellPosition.X + this.cellPosition.Width/2f) - imagePosition.Width/2f); 2159 imagePosition.X = this.cellPosition.Right - imagePosition.Width; 2227 if(newWidth > this.cellPosition.Width) 2229 newWidth = this.cellPosition.Width; 2244 if(seriesMarkerPosition.Height <= 0 || seriesMarkerPosition.Width <= 0) 2250 seriesMarkerPosition.X = (int)((this.cellPosition.X + this.cellPosition.Width/2f) - seriesMarkerPosition.Width/2f); 2264 seriesMarkerPosition.X = this.cellPosition.Right - seriesMarkerPosition.Width; 2305if (imageScale.Width > seriesMarkerPosition.Width) 2307scaleValue = Math.Max(scaleValue, (float)imageScale.Width / (float)seriesMarkerPosition.Width); 2312imageScale.Width = (int)(imageScale.Width / scaleValue); 2314imageScale.X = (int)((seriesMarkerPosition.X + seriesMarkerPosition.Width / 2f) - imageScale.Width / 2f); 2407 int markerSize = (int)Math.Min(seriesMarkerPosition.Width, seriesMarkerPosition.Height); 2423 point.X = (int)(seriesMarkerPosition.X + seriesMarkerPosition.Width/2f); 2446 if(imageScale.Width > seriesMarkerPosition.Width) 2448 scaleValue = Math.Max(scaleValue, (float)imageScale.Width / (float)seriesMarkerPosition.Width); 2453 imageScale.Width = (int)(imageScale.Width / scaleValue);
WinForm\ChartWinControl.cs (2)
429paintBufferBitmap.Width < scaleX * ClientRectangle.Width || 439paintBufferBitmap = new Bitmap((int)(ClientRectangle.Width * scaleX), (int)(ClientRectangle.Height * scaleY), e.Graphics);
WinForm\Utilities\Printing.cs (7)
146_chartImage.Width = position.Width; 257marginPixel.Width = (int)(marginPixel.Width * (ev.Graphics.DpiX / 100.0f)); 264float chartWidthScale = ((float)marginPixel.Width) / ((float)chartPosition.Width); 266chartPosition.Width = (int)(chartPosition.Width * Math.Min(chartWidthScale, chartHeightScale)); 270chartPosition.X += (marginPixel.Width - chartPosition.Width) / 2;
System.Workflow.Activities (24)
Designers\ConditionalDesigner.cs (6)
99diamondRectangle.Height = diamondRectangle.Width; 100diamondRectangle.X = bounds.Left + bounds.Width / 2 - diamondRectangle.Width / 2; 121new Point(rectangle.Left + rectangle.Width / 2, rectangle.Top), 123new Point(rectangle.Left + rectangle.Width / 2, rectangle.Bottom - 1), 125new Point(rectangle.Left + rectangle.Width / 2, rectangle.Top)
Designers\ListenDesigner.cs (3)
79roundRectangle.Height = roundRectangle.Width; 80roundRectangle.X = bounds.Left + bounds.Width / 2 - roundRectangle.Width / 2;
Designers\SetStateDesigner.cs (1)
97bounds.Width - margin.Width * 2,
Designers\StateDesigner.cs (2)
802int midHorz = bounds.X + (bounds.Width / 2); 813int midHorz = bounds.X + (bounds.Width / 2);
Designers\StateDesigner.Layouts.cs (3)
1020if (rectangle.Width > 0 && rectangle.Height > 0) 1377bounds.Left + (bounds.Width - _designerLayout.Size.Width) / 2, 1385origin.X = bounds.Left + (bounds.Width - activeDesignerSize.Width) / 2;
Designers\StateDesignerConnector.cs (4)
234path.AddLine(new Point(bounds.Left + bounds.Width / 2, bounds.Top), new Point(bounds.Right, bounds.Top + bounds.Height / 2)); 235path.AddLine(new Point(bounds.Right, bounds.Top + bounds.Height / 2), new Point(bounds.Left + bounds.Width / 2, bounds.Bottom)); 236path.AddLine(new Point(bounds.Left + bounds.Width / 2, bounds.Bottom), new Point(bounds.Left, bounds.Top + bounds.Height / 2)); 237path.AddLine(new Point(bounds.Left, bounds.Top + bounds.Height / 2), new Point(bounds.Left + bounds.Width / 2, bounds.Top));
Designers\StateMachineDesignerPaint.cs (1)
59int width = rectangle.Width;
Designers\WhileDesigner.cs (3)
51connectionPoint = new Point(bounds.Left + bounds.Width / 2 + e.AmbientTheme.Margin.Width / 2, bounds.Top + e.AmbientTheme.Margin.Height / 2); 54points[0].X = bounds.Left + bounds.Width / 2; 64DrawConnectors(e.Graphics, compositeDesignerTheme.ForegroundPen, new Point[] { points[0], new Point(bounds.Left + bounds.Width / 2, bounds.Bottom) }, LineAnchor.None, LineAnchor.None);
Rules\Design\Dialogs\IntellisenseTextBox.cs (1)
410this.listBoxAutoComplete.Size = new Size(this.listBoxAutoComplete.Items[0].Bounds.Width + 30, 72);
System.Workflow.ComponentModel (163)
AuthoringOM\Design\ActivityDesigner.cs (7)
950hitRectangle = new Rectangle(bounds.Left, bounds.Top, bounds.Width, bounds.Height - bounds.Height); 953hitRectangle = new Rectangle(bounds.Right, bounds.Top, bounds.Width - bounds.Width, bounds.Height); 956hitRectangle = new Rectangle(bounds.Left, bounds.Bottom, bounds.Width, bounds.Bottom - bounds.Bottom); 1072Rectangle viewPort = new Rectangle(bounds.Location, new Size(bounds.Width + 1, bounds.Height + 1)); 1183connections.Add(new Point(bounds.Left + bounds.Width / 2, bounds.Top)); 1189connections.Add(new Point(bounds.Left + bounds.Width / 2, bounds.Bottom));
AuthoringOM\Design\ActivityPreviewDesigner.cs (6)
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); 799dropConnector.Width = (dropConnector.Width > ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0)) ? ((designerTheme != null) ? designerTheme.ConnectorSize.Width : 0) : dropConnector.Width; 800return new Point(dropConnector.Left + dropConnector.Width / 2, dropConnector.Top + dropConnector.Height / 2); 935Size selectionSize = new Size(Math.Max(itemBounds.Width / 6, 1), Math.Max(itemBounds.Height / 6, 1));
AuthoringOM\Design\CompositeActivityDesigner.cs (5)
244expandButtonRectangle.X += (bounds.Width - ((3 * designerTheme.ExpandButtonSize.Width / 2) + anchorSize.Width)) / 2; 305imageRectangle.X += (bounds.Width - imageSize.Width) / 2; 309imageRectangle.X += (bounds.Width - (imageSize.Width + 3 * expandButtonSize.Width / 2)) / 2; 336int maxAvailableWidth = bounds.Width - (2 * margin.Width + 3 * expandButtonSize.Width / 2); 355textRectangle.X += (bounds.Width - (3 * expandButtonSize.Width / 2 + textSize.Width)) / 2;
AuthoringOM\Design\Connector.cs (7)
523path.AddLine(new Point(bounds.Left + bounds.Width / 2, bounds.Top), new Point(bounds.Right, bounds.Top + bounds.Height / 2)); 524path.AddLine(new Point(bounds.Right, bounds.Top + bounds.Height / 2), new Point(bounds.Left + bounds.Width / 2, bounds.Bottom)); 525path.AddLine(new Point(bounds.Left + bounds.Width / 2, bounds.Bottom), new Point(bounds.Left, bounds.Top + bounds.Height / 2)); 526path.AddLine(new Point(bounds.Left, bounds.Top + bounds.Height / 2), new Point(bounds.Left + bounds.Width / 2, bounds.Top)); 1259int minLengthForSegmentEditPoint = Source.Bounds.Width * 4; 1349if ((distance < current.Bounds.Width || distance < current.Bounds.Height) && next.Type == EditPoint.EditPointTypes.MultiSegmentEditPoint) 1359if ((distance < current.Bounds.Width || distance < current.Bounds.Height) && previous.Type == EditPoint.EditPointTypes.MultiSegmentEditPoint)
AuthoringOM\Design\DesignerHelpers.cs (24)
193graphics.DrawImage(image, imageRectangle, source.X, source.Y, source.Width, source.Height, GraphicsUnit.Pixel, imageAttributes); 203rectangle.Width = Math.Min(size.Width, destination.Width); 215rectangle.X = destination.Right - rectangle.Width; 217rectangle.X = destination.Left + destination.Width / 2 - rectangle.Width / 2; 382graphics.DrawLine(CompositeDesignerTheme.ExpandButtonForegoundPen, boundingRect.Left + boundingRect.Width / 2, boundingRect.Top + 2, boundingRect.Left + boundingRect.Width / 2, boundingRect.Bottom - 2); 425if (shadowSourceRectangle.IsEmpty || shadowSourceRectangle.Width < 0 || shadowSourceRectangle.Height < 0) 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); 797int arrowWidth = bounds.Width + bounds.Width % 2; 1920distances.Add(DistanceBetweenPoints(point, new Point(rect.Left + rect.Width / 2, rect.Top))); 1924distances.Add(DistanceBetweenPoints(point, new Point(rect.Right + rect.Width / 2, rect.Bottom)));
AuthoringOM\Design\DesignerWidgets.cs (35)
139using (Region clipRegion = new Region(new Rectangle(bounds.X, bounds.Y, bounds.Width + 1, bounds.Height + 1))) 196using (Region clipRegion = new Region(new Rectangle(bounds.X, bounds.Y, bounds.Width + 1, bounds.Height + 1))) 213int margin = itemRectangle.Width / 5; 239itemRectangle.X += (itemRectangle.Width - itemRectangle.Height) / 2; 366availableSize = this.bounds.Width - (2 * (2 * this.margin.Width + this.buttonSize.Width)); 378this.itemStrip.Size = new Size(Math.Min(this.bounds.Width, reqdSize.Width), Math.Min(availableSize, reqdSize.Height)); 841int totalStripSize = this.bounds.Width - this.margin.Width; 1226graphics.DrawRectangle(SystemPens.ControlDarkDark, this.formRectangle.X, this.formRectangle.Y, this.formRectangle.Width - 1, this.formRectangle.Height - 1); 1239graphics.FillRectangle(SystemBrushes.InactiveCaptionText, itemBounds.X, itemBounds.Y, itemBounds.Width - 1, itemBounds.Height - 1); 1240graphics.DrawRectangle(SystemPens.ActiveCaption, itemBounds.X, itemBounds.Y, itemBounds.Width - 1, itemBounds.Height - 1); 1927RectangleF tabTextRectangleF = new RectangleF(tabTextRectangle.X, tabTextRectangle.Y, tabTextRectangle.Width, tabTextRectangle.Height); 1932using (Bitmap bitmap = new Bitmap(tabTextRectangle.Height, tabTextRectangle.Width, e.Graphics)) 2014int lastItemWidth = (this.orientation == Orientation.Horizontal) ? lastItemStruct.TabItemRectangle.Width - itemSizeDecrease : lastItemStruct.TabItemRectangle.Height - itemSizeDecrease; 2024if ((i == this.tabItemList.Count - 1) && this.drawItems[i].TabItemRectangle.Width < this.reqTabItemSize) 2112textRectangle.X += imageRectangle.Width + TabMargin; 2113textRectangle.Width -= (imageRectangle.Width + TabMargin); 2122if (textRectangle.Width <= 0 || textRectangle.Height <= 0) 2742imageRectangle.Size = new Size(itemRectangle.Width - 4, itemRectangle.Height - 4); 2759graphics.DrawLine(ambientTheme.DropIndicatorPen, dropTargets[activeDropTarget].Left + dropTargets[activeDropTarget].Width / 2, dropTargets[activeDropTarget].Top, dropTargets[activeDropTarget].Left + dropTargets[activeDropTarget].Width / 2, dropTargets[activeDropTarget].Bottom); 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); 3254this.canvasBounds.Location = new Point(value.X + this.bounds.Width / 2 - this.canvasBounds.Width / 2, this.previewModeDescRectangle.Bottom + margin.Height); 3260location.X = this.canvasBounds.Left + this.canvasBounds.Width / 2 - PreviewDesigner.Size.Width / 2; 3376this.canvasBounds.Size = new Size(Math.Max(this.canvasBounds.Width, designerTheme.PreviewWindowSize.Width), Math.Max(this.canvasBounds.Height, designerTheme.PreviewWindowSize.Height)); 3383this.canvasBounds.Width = Math.Max(this.canvasBounds.Width, minWidth); 3394totalSize.Width = this.canvasBounds.Width + 2 * margin.Width; 3413graphics.DrawRectangle(Pens.Black, this.previewModeButtonRectangle.Left - 1, this.previewModeButtonRectangle.Top - 1, this.previewModeButtonRectangle.Width + 1, this.previewModeButtonRectangle.Height + 1); 3417ActivityDesignerPaint.DrawImage(graphics, previewModeImage, new Rectangle(this.previewModeButtonRectangle.Left + 2, this.previewModeButtonRectangle.Top + 2, this.previewModeButtonRectangle.Width - 4, this.previewModeButtonRectangle.Height - 4), DesignerContentAlignment.Center); 3459Size maxBitmapSize = new Size(this.canvasBounds.Width - 2 * margin.Width, this.canvasBounds.Height - 2 * margin.Height); 3466destnRectangle.X = this.canvasBounds.Left + this.canvasBounds.Width / 2 - destnRectangle.Width / 2;
AuthoringOM\Design\Dialogs\TypeBrowserDialog.cs (2)
509Rectangle lineRectangle = new Rectangle(this.ClientRectangle.Left, this.artifactLabel.Bottom + ((this.typeNameTableLayoutPanel.Top + this.typeTextBox.Top - this.artifactLabel.Bottom) / 2), this.ClientRectangle.Width, 1); 514lineRectangle = new Rectangle(this.ClientRectangle.Left, this.helpTextHolder.Bottom + ((this.okCancelTableLayoutPanel.Top + this.buttonOK.Top - this.helpTextHolder.Bottom) / 2), this.ClientRectangle.Width, 1);
AuthoringOM\Design\FreeFormDesigner.cs (1)
262minimumSize.Width = Math.Max(minimumSize.Width, childRectangle.Width);
AuthoringOM\Design\Glyphs\ConfigErrorGlyph.cs (3)
84graphics.DrawRectangle(SystemPens.ControlDarkDark, activatedBounds.Left, activatedBounds.Top, activatedBounds.Width - 1, activatedBounds.Height - 1); 86activatedBounds.X += bounds.Width + ambientTheme.Margin.Width; 87activatedBounds.Width -= (bounds.Width + 2 * ambientTheme.Margin.Width);
AuthoringOM\Design\Glyphs\SelectionGlyph.cs (2)
56grabHandles[1] = new Rectangle(new Point(selectionRect.Left + (selectionRect.Width - grabHandleSize.Width) / 2, selectionRect.Top), grabHandleSize); 60grabHandles[5] = new Rectangle(new Point(selectionRect.Left + (selectionRect.Width - grabHandleSize.Width) / 2, selectionRect.Bottom - grabHandleSize.Height), grabHandleSize);
AuthoringOM\Design\MessageFilters\AutoScrollExpandMessageFilter.cs (4)
119if (clientPoint.X <= clientRectangle.Width / 10 && hScrollBar.Value > 0) 121else if (clientPoint.X >= clientRectangle.Right - clientRectangle.Width / 10 && hScrollBar.Value < hScrollBar.Maximum - hScrollBar.LargeChange) 170scrollIndicatorRectangles[2].X = (clientRectangle.Width - scrollIndicatorSize.Width) / 2; 175scrollIndicatorRectangles[3].X = (clientRectangle.Width - scrollIndicatorSize.Width) / 2;
AuthoringOM\Design\MessageFilters\DragDropManager.cs (3)
676descriptionRectangle.Offset(imageRectangle.Width + AmbientTheme.DragImageMargins.Width, 0); 678Size draggedImageSize = parentView.LogicalSizeToClient(new Size(imageRectangle.Width + descriptionRectangle.Width, Math.Max(imageRectangle.Height, descriptionRectangle.Height)));
AuthoringOM\Design\MessageFilters\DragSelectionMessageFilter.cs (2)
121e.Graphics.FillRectangle(dragRectangleBrush, dragRectangle.X, dragRectangle.Y, dragRectangle.Width - 1, dragRectangle.Height - 1); 122e.Graphics.DrawRectangle(ambientTheme.SelectionForegroundPen, dragRectangle.X, dragRectangle.Y, dragRectangle.Width - 1, dragRectangle.Height - 1);
AuthoringOM\Design\MessageFilters\DynamicActionMessageFilter.cs (1)
352if (distance > rectangle.Width / 3 || distance > rectangle.Height / 3)
AuthoringOM\Design\MessageFilters\ResizingMessageFilter.cs (3)
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)
170Point center = parentView.LogicalPointToClient(new Point(dragRectangle.Location.X + dragRectangle.Width / 2, dragRectangle.Location.Y + dragRectangle.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 (8)
351parallelLinks[0].X = bounds.Left + bounds.Width / 2; 353parallelLinks[1].X = bounds.Left + bounds.Width / 2; 372parallelLinks[0].X = bounds.Left + bounds.Width / 2; 374parallelLinks[1].X = bounds.Left + bounds.Width / 2; 424DrawConnectors(e.Graphics, e.AmbientTheme.DropIndicatorPen, new Point[] { new Point(dropTargetRectangle.Left + dropTargetRectangle.Width / 2, dropTargetRectangle.Top + 2), new Point(dropTargetRectangle.Left + dropTargetRectangle.Width / 2, dropTargetRectangle.Bottom - 2) }, compositeDesignerTheme.ConnectorStartCap, compositeDesignerTheme.ConnectorEndCap); 434connectorPoints[0].X = dropTargetRectangle.X + dropTargetRectangle.Width / 2; 452connectorPoints[1].X = dropTargetRectangle.X + dropTargetRectangle.Width / 2;
AuthoringOM\Design\SequentialActivityDesigner.cs (16)
163helpTextRectangle.X = connectors[0].Left + connectors[0].Width / 2 - this.helpTextSize.Width / 2; 208connections.Add(new Point(startDesignerBounds.Left + startDesignerBounds.Width / 2, startDesignerBounds.Top)); 209connections.Add(new Point(startDesignerBounds.Left + startDesignerBounds.Width / 2, startDesignerBounds.Bottom)); 238connections.Add(new Point(endDesignerBounds.Left + endDesignerBounds.Width / 2, endDesignerBounds.Top)); 239connections.Add(new Point(endDesignerBounds.Left + endDesignerBounds.Width / 2, endDesignerBounds.Bottom)); 255connectorBounds[i].Inflate(3 * connectorBounds[i].Width, 0); 411DrawConnectors(e.Graphics, compositeDesignerTheme.ForegroundPen, new Point[] { new Point(connectors[0].X + connectors[0].Width / 2, connectors[0].Y + 2), new Point(connectors[0].X + connectors[0].Width / 2, helpTextRectangle.Top - 2) }, compositeDesignerTheme.ConnectorStartCap, LineAnchor.None); 412DrawConnectors(e.Graphics, compositeDesignerTheme.ForegroundPen, new Point[] { new Point(connectors[0].X + connectors[0].Width / 2, helpTextRectangle.Bottom + 2), new Point(connectors[0].X + connectors[0].Width / 2, connectors[0].Bottom - 2) }, LineAnchor.None, compositeDesignerTheme.ConnectorEndCap); 425DrawConnectors(e.Graphics, pen, new Point[] { new Point(connectors[i].Left + connectors[i].Width / 2, connectors[i].Top + 2), new Point(connectors[i].Left + connectors[i].Width / 2, connectors[i].Bottom - 2) }, startCap, endCap); 493containerSize.Width = Math.Max(helpTextRectangle.Width, containerSize.Width); 530glyphLocation = new Point(helpTextRectangle.Left + helpTextRectangle.Width / 2 + 1, helpTextRectangle.Top - ambientTheme.DropIndicatorSize.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 (7)
111bounds.Width = Math.Max(imageBounds.Width, textBounds.Width) + 2 * margin.Width; 119bounds.X = designerBounds.Left + designerBounds.Width / 2 - bounds.Width / 2; 140bounds.X = designerBounds.Left + designerBounds.Width / 2 - this.textSize.Width / 2; 164bounds.X = designerBounds.Left + designerBounds.Width / 2 - bounds.Width / 2;
AuthoringOM\Design\StructuredCompositeActivityDesigner.cs (1)
696return new Point(dropConnector.Left + dropConnector.Width / 2, dropConnector.Top + dropConnector.Height / 2);
AuthoringOM\Design\WorkflowLayouts.cs (12)
145this.parentView.RootDesigner.Bounds.Width >= 0 && this.parentView.RootDesigner.Bounds.Height >= 0) 233this.parentView.RootDesigner.Bounds.Width >= 0 && this.parentView.RootDesigner.Bounds.Height >= 0) 424Size deltaSize = new Size(pageLayoutData.ViewablePageBounds.Width - intersectedPhysicalViewPort.Width, pageLayoutData.ViewablePageBounds.Height - intersectedPhysicalViewPort.Height); 433insersectedLogicalViewPort.Width = pageLayoutData.LogicalPageBounds.Width - deltaLocation.X; 459Size deltaSize = new Size(pageLayoutData.LogicalPageBounds.Width - intersectedLogicalViewPort.Width, pageLayoutData.LogicalPageBounds.Height - intersectedLogicalViewPort.Height); 468insersectedPhysicalViewPort.Width = pageLayoutData.ViewablePageBounds.Width - deltaLocation.X; 566viewPortBitmapArea.Width = pageLayoutData.LogicalPageBounds.Width; 641if (!pageLayoutData.PageBounds.IntersectsWith(physicalViewPort) || pageLayoutData.PageBounds.Width <= 0 || pageLayoutData.PageBounds.Height <= 0) 672viewPortBitmapArea.Width = intersectedViewPort.Width; 690graphics.DrawRectangle(ambientTheme.ForegroundPen, pageLayoutData.ViewablePageBounds.Left - 3, pageLayoutData.ViewablePageBounds.Top - 3, pageLayoutData.ViewablePageBounds.Width + 6, pageLayoutData.ViewablePageBounds.Height + 6);
AuthoringOM\Design\WorkflowPrinting.cs (6)
267layoutRectangle.Width = Math.Min(headerFooterPrintData.PageBoundsWithoutMargin.Width, layoutRectangle.Width); 280layoutRectangle.X = headerFooterPrintData.PageBoundsWithoutMargin.Left + ((headerFooterPrintData.PageBoundsWithoutMargin.Width - layoutRectangle.Width) / 2); //align to the middle 285layoutRectangle.X = headerFooterPrintData.PageBoundsWithoutMargin.Left + (headerFooterPrintData.PageBoundsWithoutMargin.Width - layoutRectangle.Width); //align to the right corner
AuthoringOM\Design\WorkflowView.cs (6)
1535viewPortData.LogicalViewPort = new Rectangle(Point.Empty, new Size(rootDesigner.Bounds.Width + 2 * DefaultWorkflowLayout.Separator.Width, rootDesigner.Bounds.Height + 2 * DefaultWorkflowLayout.Separator.Height)); 1536viewPortData.MemoryBitmap = new Bitmap(viewPortData.LogicalViewPort.Width, viewPortData.LogicalViewPort.Height, graphics); 1744if (rect.Width > clientRectangle.Width) 1745scrollDelta.Width = (rect.Left + rect.Width / 2) - (clientRectangle.Left + clientRectangle.Width / 2);
System.WorkflowServices (1)
System\Workflow\Activities\Design\GradientPanel.cs (1)
88Rectangle shadowRect = new Rectangle(frameRect.X, frameRect.Y + 6, frameRect.Width, frameRect.Height - 5);