458 writes to X
System.Drawing (6)
commonui\System\Drawing\Icon.cs (2)
507
copy.
X
+= (int) graphics.Transform.OffsetX;
532
copy.
X
+= (int) graphics.Transform.OffsetX;
commonui\System\Drawing\Rectangle.cs (4)
103
X
= value.X;
393
this.
X
-= width;
428
this.
X
= result.X;
496
this.
X
+= x;
System.Web.DataVisualization (27)
Common\General\Legend.cs (19)
827
cellPosition.
X
+= itemHalfSpacing.Width;
839
cellPosition.
X
+= this._subColumnSizes[index, subColumnIndex];
843
cellPosition.
X
+= this.GetSeparatorSize(this.ItemColumnSeparator).Width;
848
cellPosition.
X
+= this._subColumnSizes[columnIndex, subColumnIndex];
2459
separatorPosition.
X
= legendItem.Cells[0].cellPosition.Left;
2495
separatorRect.
X
+= this.GetBorderSize() + this._offset.Width;
2499
separatorRect.
X
+= this._horizontalSpaceLeft / 2;
2512
separatorRect.
X
+= this._subColumnSizes[columnIndex, subColumnIndex];
2522
separatorRect.
X
+= separatorRect.Width;
4042
legendPosition.
X
+= this.GetBorderSize();
4075
rect.
X
+= (int)(this._horizontalSpaceLeft / 2f);
4079
rect.
X
= prevRightLocation;
4118
fillRect.
X
= newX;
4137
fillRect.
X
-= this._itemColumnSpacingRel / 2;
4165
fillRect.
X
+= legendPosition.X - fillRect.X;
4214
separatorRect.
X
= columnStart;
4274
legendPosition.
X
+= this.GetBorderSize();
4317
rect.
X
+= this._offset.Width;
4318
rect.
X
+= this.GetBorderSize();
Common\General\LegendColumns.cs (8)
1447
this.cellPosition.
X
+= (int)(this.Margins.Left * singleWCharacterSize.Width / 100f);
2145
imagePosition.
X
= (int)((this.cellPosition.X + this.cellPosition.Width/2f) - imagePosition.Width/2f);
2153
imagePosition.
X
= this.cellPosition.X;
2159
imagePosition.
X
= this.cellPosition.Right - imagePosition.Width;
2250
seriesMarkerPosition.
X
= (int)((this.cellPosition.X + this.cellPosition.Width/2f) - seriesMarkerPosition.Width/2f);
2258
seriesMarkerPosition.
X
= this.cellPosition.X;
2264
seriesMarkerPosition.
X
= this.cellPosition.Right - seriesMarkerPosition.Width;
2314
imageScale.
X
= (int)((seriesMarkerPosition.X + seriesMarkerPosition.Width / 2f) - imageScale.Width / 2f);
System.Windows.Forms (330)
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (13)
576
imageBounds.
X
= imageStart.X + 1;
627
r.
X
-= 1;
1145
layout.focus.
X
++;
1206
layout.checkBounds.
X
= (field.X+field.Width) - layout.checkBounds.Width;
1209
layout.checkBounds.
X
= field.X + (field.Width - layout.checkBounds.Width)/2;
1226
layout.checkArea.
X
= field.X;
1232
layout.field.
X
+= checkSizeFull + 1;
1238
layout.checkArea.
X
= field.X + field.Width - checkSizeFull;
1247
layout.checkArea.
X
= field.X;
1258
layout.checkArea.
X
= field.X;
1381
layout.textBounds.
X
= Math.Max(Math.Min(layout.textBounds.X, layout.field.X + (layout.field.Width - layout.textBounds.Width)/2), layout.field.X);
1387
layout.textBounds.
X
= layout.imageBounds.X + layout.imageBounds.Width;
1411
layout.textBounds.
X
++;
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonBaseAdapter.cs (1)
182
check.
X
--; // compensate for Windows drawing slightly offset to right
winforms\Managed\System\WinForms\CheckedListBox.cs (2)
703
box.
X
= bounds.X + bounds.Width - idealCheckSize - scaledListItemStartPosition;
729
textBounds.
X
= bounds.X;
winforms\Managed\System\WinForms\ComboBox.cs (5)
5944
dropDownRect.
X
+= WhiteFillRectWidth;
5952
innerBorder.
X
= clientRect.Width - innerBorder.Right;
5953
innerInnerBorder.
X
= clientRect.Width - innerInnerBorder.Right;
5954
dropDownRect.
X
= clientRect.Width - dropDownRect.Right;
5955
whiteFillRect.
X
= clientRect.Width - whiteFillRect.Right + 1; // since we're filling, we need to move over to the next px.
winforms\Managed\System\WinForms\Control.cs (1)
9739
rectangle.
X
++;
winforms\Managed\System\WinForms\ControlPaint.cs (5)
93
result.
X
= (szCtl.Width - result.Width) / 2;
123
result.
X
= (bounds.Width - result.Width) /2;
482
imageRectangle.
X
+= clipRect.Width - imageRectangle.Width;
1295
rectangle.
X
+= 1;
1297
rectangle.
X
-= 1;
winforms\Managed\System\WinForms\Cursor.cs (1)
415
targetRect.
X
+= (int) graphics.Transform.OffsetX;
winforms\Managed\System\WinForms\DataGrid.cs (39)
1334
backButton.
X
= MirrorRectangle(backButton, layout.Inside, isRightToLeft());
1335
detailsButton.
X
= MirrorRectangle(detailsButton, layout.Inside, isRightToLeft());
4523
refresh.
X
= layout.Inside.X;
4712
r.
X
= Math.Min(inside.Right - 3, r.X);
4713
r.
X
= Math.Max(r.X , 0);
4853
rightArea.
X
= left;
4897
clip.
X
= leftEdge + 3;
4994
rightArea.
X
= rightToLeft ? layout.Data.X : left;
5406
insideLeft.
X
+= newRowHeaderWidth;
5413
rowHeaders.
X
= insideLeft.Right - newRowHeaderWidth;
5426
colHeaders.
X
+= newRowHeaderWidth;
5432
topLeft.
X
= colHeaders.Right - newRowHeaderWidth;
5770
rowExclude.
X
+= cx;
5771
rowExclude.
X
= MirrorRectangle(rowExclude, layout.Data, alignToRight);
6329
rowRect.
X
-= isRightToLeft() ? 0 : layout.RowHeaders.Width;
6431
cellBounds.
X
+= layout.Data.X - negOffset;
6432
cellBounds.
X
= MirrorRectangle(cellBounds, layout.Data, isRightToLeft());
6450
rowBounds.
X
= layout.Data.X;
6611
columnArea.
X
= x;
6612
columnArea.
X
= MirrorRectangle(columnArea, layout.Data, isRightToLeft());
6655
invalid.
X
= layout.RowHeaders.X;
6671
inner.
X
-= vertScrollBar.Width;
6768
layout.ColumnHeaders.
X
+= vertWidth;
6797
layout.ColumnHeaders.
X
+= vertWidth;
6851
layout.Data.
X
+= vertScrollBar.Width;
7123
boundingRect.
X
-= negOffset;
7129
boundingRect.
X
= boundingRect.Right - columnHeaderWidth;
7176
textBounds.
X
= boundingRect.Right - cx - textBounds.Width;
7180
textBounds.
X
= boundingRect.X + cx;
7201
textBounds.
X
-= 2; textBounds.Y += 2;
7205
textBounds.
X
+= 2; textBounds.Y += 2;
7234
textBounds.
X
+= 2; textBounds.Y -= 2;
7238
textBounds.
X
-= 2; textBounds.Y -= 2;
7263
textBounds.
X
-= textBounds.Height;
7276
textBounds.
X
+= cx;
7437
headerBounds.
X
= rowBounds.Right - headerBounds.Width;
7446
rowBounds.
X
+= headerBounds.Width;
7452
dataBounds.
X
-= negOffset;
8850
underParentRows.
X
-= isRightToLeft() ? 0 : layout.RowHeaders.Width;
winforms\Managed\System\WinForms\DataGridCaption.cs (4)
488
textRect.
X
= bounds.Right - textRect.Width;
489
backButtonRect.
X
= bounds.X + xOffset * 4 + downButtonWidth;
490
downButtonRect.
X
= bounds.X + xOffset * 2;
579
border.
X
= textBounds.Right - textPadding;
winforms\Managed\System\WinForms\DataGridParentRows.cs (12)
149
ret.
X
= layout.leftArrow.IsEmpty ? layout.data.X : layout.leftArrow.Right;
568
border.
X
= bounds.Right - borderWidth;
881
paintBounds.
X
= MirrorRect(bounds, paintBounds, alignToRight);
892
rowBounds.
X
+= alignToRight ? 0 : paintedWidth;
897
paintBounds.
X
= bounds.X + paintedWidth;
899
paintBounds.
X
= MirrorRect(bounds, paintBounds, alignToRight);
923
paintBounds.
X
= bounds.X + cx;
925
paintBounds.
X
= MirrorRect(bounds, paintBounds, alignToRight);
942
paintBounds.
X
= bounds.X + cx;
944
paintBounds.
X
= MirrorRect(bounds, paintBounds, alignToRight);
969
paintBounds.
X
= bounds.X + cx;
971
paintBounds.
X
= MirrorRect(bounds, paintBounds, alignToRight);
winforms\Managed\System\WinForms\DataGridRelationshipRow.cs (14)
273
relRect.
X
+= DataGrid.GetRowHeaderRect().X + rowHeaderWidth;
275
relRect.
X
= MirrorRelationshipRectangle(relRect, DataGrid.GetRowHeaderRect(), DataGrid.RightToLeft == RightToLeft.Yes);
295
outline.
X
= MirrorRectangle(outline.X, outline.Width, insideRowHeaders, alignToRight);
360
relRect.
X
+= rowHeaders.X + this.dgTable.RowHeaderWidth;
361
relRect.
X
= MirrorRelationshipRectangle(relRect, rowHeaders, alignToRight);
438
relRect.
X
+= rowHeaders.X + this.dgTable.RowHeaderWidth;
439
relRect.
X
= MirrorRelationshipRectangle(relRect, rowHeaders, alignToRight);
479
relRect.
X
+= rowHeaders.X + this.dgTable.RowHeaderWidth;
480
relRect.
X
= MirrorRelationshipRectangle(relRect, rowHeaders, alignToRight);
504
relRect.
X
+= rowHeaders.X + this.dgTable.RowHeaderWidth;
505
relRect.
X
= MirrorRelationshipRectangle(relRect, rowHeaders, alignToRight);
578
bounds.
X
+= errRect.Width + xOffset;
644
relRect.
X
= alignToRight ? bounds.Right - relRect.Width : bounds.X;
911
bounds.
X
+= rowBounds.X;
winforms\Managed\System\WinForms\DataGridRow.cs (6)
499
cellBounds.
X
= bounds.Right - cx - cellBounds.Width;
501
cellBounds.
X
= bounds.X + cx;
599
bounds.
X
+= PaintIcon(g, bounds, true, alignToRight, bmp).Width + xOffset;
607
bounds.
X
+= PaintIcon(g, bounds, RowNumber == this.DataGrid.CurrentCell.RowNumber, alignToRight, bmp).Width + xOffset;
614
bounds.
X
+= PaintIcon(g, bounds, RowNumber == this.DataGrid.CurrentCell.RowNumber, alignToRight, bmp).Width + xOffset;
645
bounds.
X
+= errRect.Width + xOffset;
winforms\Managed\System\WinForms\DataGridTable.cs (1)
912
relationshipRect.
X
= 0; //indentWidth;
winforms\Managed\System\WinForms\DataGridView.cs (4)
2702
rectDisplay.
X
= this.vertScrollBar.Width;
3419
rectTmp.
X
--;
3429
rectTmp.
X
++;
3436
rectTmp.
X
+= totalVisibleFrozenWidth;
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (1)
448
rectThemeMargins.
X
= rectContent.X;
winforms\Managed\System\WinForms\DataGridViewCell.cs (16)
1059
rect.
X
= (advancedBorderStyle.Left == DataGridViewAdvancedCellBorderStyle.None) ? 0 : 1;
1062
rect.
X
++;
1087
rect.
X
+= this.owningColumn.DividerWidth;
3599
bounds.
X
+= dividerThickness;
4330
iconBounds.
X
+= cellBounds.X;
4358
rectPadding.
X
= bounds.Right - cellStyle.Padding.Left;
4361
rectPadding.
X
= bounds.Left + cellStyle.Padding.Right;
4367
rectPadding.
X
= bounds.Right - cellStyle.Padding.Right;
4370
rectPadding.
X
= bounds.Left + cellStyle.Padding.Left;
4545
borderAndPaddingWidths.
X
+= cellStyle.Padding.Left;
5111
columnRect.
X
-= this.owner.OwningColumn.Width;
5115
columnRect.
X
= columnRect.Right;
5128
columnRect.
X
-= negOffset;
5144
columnRect.
X
= columnRect.Right;
5148
columnRect.
X
-= this.owner.OwningColumn.Width;
5154
rowRect.
X
= columnRect.X;
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (3)
880
valBounds.
X
+= rectThemeMargins.Width;
885
valBounds.
X
+= rectThemeMargins.X;
959
valBounds.
X
+= sortGlyphSeparatorWidth +
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (11)
750
borderAndPaddingWidths.
X
+= cellStyle.Padding.Left;
2004
cellBounds.
X
-= this.DataGridView.FirstDisplayedScrollingColumnHiddenWidth;
2459
dropRect.
X
--;
2476
dropRect.
X
++;
2499
textBounds.
X
--;
2512
errorBounds.
X
+= dropWidth;
2513
textBounds.
X
+= dropWidth;
2522
errorBounds.
X
+= dropWidth + 1;
2523
textBounds.
X
+= dropWidth + 1;
2543
focusBounds.
X
--;
2553
focusBounds.
X
++;
winforms\Managed\System\WinForms\DataGridViewHeaderCell.cs (1)
487
rectThemeMargins.
X
= rectContent.X;
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (13)
668
imgBounds.
X
= bounds.X;
671
imgBounds.
X
= bounds.Right - imgBounds.Width;
674
imgBounds.
X
= bounds.X;
677
imgBounds.
X
= bounds.Right - imgBounds.Width;
680
imgBounds.
X
= bounds.X;
683
imgBounds.
X
= bounds.Right - imgBounds.Width;
692
imgBounds.
X
= bounds.X;
695
imgBounds.
X
= bounds.Right - imgBounds.Width;
698
imgBounds.
X
= bounds.X;
701
imgBounds.
X
= bounds.Right - imgBounds.Width;
704
imgBounds.
X
= bounds.X;
707
imgBounds.
X
= bounds.Right - imgBounds.Width;
717
imgBounds.
X
= bounds.X + (bounds.Width - imgBounds.Width) / 2;
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (2)
1075
focusBounds.
X
--;
1080
focusBounds.
X
++;
winforms\Managed\System\WinForms\DataGridViewMethods.cs (56)
2492
cursorClip.
X
+= cursorClip.Width - frozenWidth;
2501
cursorClip.
X
+= frozenWidth;
2505
cursorClip.
X
+= this.layout.Data.Width - frozenWidth - scrollingWidth;
2567
clip.
X
= this.layout.Data.X - this.mouseBarOffset - 1;
2572
clip.
X
+= overflowWidth;
2578
clip.
X
= leftEdge + this.Columns[columnIndex].MinimumThickness - this.mouseBarOffset - 1;
2782
clip.
X
-= mouseBarOffset + 1;
2788
clip.
X
+= minimumRowHeadersWidth - mouseBarOffset - 1;
3026
r.
X
= Math.Max(inside.Left, r.X);
3027
r.
X
= Math.Min(r.X, inside.Right - r.Width);
3032
r.
X
= Math.Min(inside.Right - r.Width, r.X);
3033
r.
X
= Math.Max(r.X, inside.Left);
3044
r.
X
= Math.Max(inside.Left, r.X);
3048
r.
X
= Math.Min(inside.Right - 3, r.X);
3049
r.
X
= Math.Max(r.X, 0);
4375
rowHeaders.
X
+= insideLeft.Width - rowHeaders.Width;
4379
insideLeft.
X
+= rowHeaders.Width;
4394
topLeft.
X
+= insideLeft.Width;
4398
colHeaders.
X
+= topLeft.Width;
4420
insideLeft.
X
++;
5507
rectScrollingArea.
X
+= emptyBackgroundWidth;
5516
rectScrollingArea.
X
+= frozenVisibleColumnsWidth;
5693
rectInsertionBar.
X
= GetColumnXFromIndex(this.Columns.GetFirstColumn(DataGridViewElementStates.Visible).Index);
5696
rectInsertionBar.
X
-= DATAGRIDVIEW_insertionBarWidth;
5722
rectInsertionBar.
X
= Math.Max(this.layout.ColumnHeaders.X,
5727
rectInsertionBar.
X
= Math.Min(GetColumnXFromIndex(this.trackColumnEdge) + this.Columns[this.trackColumnEdge].Width - offsetFromCenter,
6893
rect.
X
--;
7161
rowRect.
X
-= width;
9190
rowRect.
X
-= this.layout.RowHeaders.Width;
10400
this.layout.Data.
X
+= vertScrollBarWidth;
10408
this.layout.ColumnHeaders.
X
+= vertScrollBarWidth;
10429
this.layout.ColumnHeaders.
X
-= vertScrollBarWidth;
10435
this.layout.Data.
X
-= vertScrollBarWidth;
10452
this.layout.Data.
X
+= vertScrollBarWidth;
10460
this.layout.ColumnHeaders.
X
+= vertScrollBarWidth;
14970
rightArea.
X
= leftEdge;
17198
gridRect.
X
--;
17246
focusRect.
X
-= change;
17276
edge.
X
+= rect.Width - 1;
19799
rcNextRows.
X
+= this.layout.RowHeaders.Width;
19807
rcNextRows.
X
++;
19815
rcNextRows.
X
+= rowsWidth;
19856
edge.
X
= bounds.Width - borderWidth;
19915
cellBounds.
X
= bandBounds.Right - cx - cellBounds.Width;
19919
cellBounds.
X
= bandBounds.X + cx;
19959
scrollingBounds.
X
-= this.negOffset;
19972
rowRect.
X
+= cx;
19992
cellBounds.
X
= scrollingBounds.Right - cx - cellBounds.Width;
19996
cellBounds.
X
= scrollingBounds.X + cx;
20376
editingZone.
X
+= totalVisibleFrozenWidth;
20407
cellBounds.
X
--;
20408
cellClip.
X
--;
26448
rowsRect.
X
--;
26474
rowsRect.
X
= this.layout.Inside.X;
29067
bottomArea.
X
--;
29131
bottomArea.
X
--;
winforms\Managed\System\WinForms\DataGridViewRow.cs (7)
1627
cellBounds.
X
= rowBounds.Right - cx - cellBounds.Width;
1631
cellBounds.
X
= rowBounds.X + cx;
1683
dataBounds.
X
-= dataGridView.FirstDisplayedScrollingColumnHiddenWidth;
1694
rowRect.
X
+= cx;
1714
cellBounds.
X
= dataBounds.Right - cx - cellBounds.Width;
1718
cellBounds.
X
= dataBounds.X + cx;
1802
cellBounds.
X
= rowBounds.Right - cellBounds.Width;
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (4)
850
valBounds.
X
+= rectThemeMargins.Height;
854
valBounds.
X
+= rectThemeMargins.Y;
961
valBounds.
X
+= iconsWidth + 2 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth;
988
valBounds.
X
+= iconsWidth + 2 * DATAGRIDVIEWROWHEADERCELL_iconMarginWidth;
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (5)
207
editingControlBounds.
X
+= 1;
212
editingControlBounds.
X
+= DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetLeft;
220
editingControlBounds.
X
+= 1;
230
editingControlBounds.
X
+= DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetRight - 1;
235
editingControlBounds.
X
+= 1;
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (4)
292
bounds.
X
= bounds.Width + bounds.X - BUTTON_WIDTH;
303
bounds.
X
-= (BUTTON_WIDTH + BUTTON_PAD);
310
bounds.
X
-= (BUTTON_WIDTH + BUTTON_PAD);
317
bounds.
X
-= (BUTTON_WIDTH + BUTTON_PAD);
winforms\Managed\System\WinForms\DrawListViewItemEventArgs.cs (3)
176
resultBounds.
X
+= 4;
181
resultBounds.
X
+=4;
186
resultBounds.
X
--;
winforms\Managed\System\WinForms\ErrorProvider.cs (1)
1193
iconBounds.
X
-= windowBounds.X;
winforms\Managed\System\WinForms\Form.cs (4)
1168
bounds.
X
-= screen.X;
5872
restoredWindowBounds.
X
= x;
5887
restoreBounds.
X
= x;
5995
adjustedBounds.
X
= Left;
winforms\Managed\System\WinForms\GroupBox.cs (1)
561
textRectangle.
X
+= textOffset;
winforms\Managed\System\WinForms\GroupBoxRenderer.cs (8)
176
textBounds.
X
= bounds.Right - textBounds.Width - boxHeaderWidth + 1; // +1 to account for the margin built in the MeasureText result
179
textBounds.
X
+= boxHeaderWidth - 1; // -1 to account for the margin built in the MeasureText result
198
clipLeft.
X
= boxBounds.Right - boxHeaderWidth;
199
clipMiddle.
X
= clipLeft.Left - clipMiddle.Width;
204
clipMiddle.
X
= clipLeft.Right;
205
clipRight.
X
= clipMiddle.Right;
269
textBounds.
X
= bounds.Right - textBounds.Width - textOffset;
272
textBounds.
X
+= textOffset;
winforms\Managed\System\WinForms\Layout\CommonProperties.cs (1)
287
if (!xChangedButNotSpecified) originalBounds.
X
= x;
winforms\Managed\System\WinForms\Layout\DockAndAnchorLayout.cs (1)
305
remainingBounds.
X
+= element.Bounds.Width;
winforms\Managed\System\WinForms\Layout\FlowLayout.cs (2)
345
value.
X
= DisplayRect.Right - value.Right;
420
newBounds.
X
= DisplayRect.Right - bounds.X - bounds.Width + ElementProxy.Margin.Left - ElementProxy.Margin.Right;
winforms\Managed\System\WinForms\Layout\LayoutUtils.cs (9)
261
withinThis.
X
+= withinThis.Width - alignThis.Width;
264
withinThis.
X
+= (withinThis.Width - alignThis.Width) / 2;
273
withinThis.
X
+= withinThis.Width - alignThis.Width;
276
withinThis.
X
+= (withinThis.Width - alignThis.Width) / 2;
324
rect.
X
-= padding.Left;
332
rect.
X
+= padding.Left;
441
region2.
X
+= specifiedContent.Width;
445
region1.
X
+= bounds.Width - specifiedContent.Width;
523
bounds.
X
= withinBounds.Width - bounds.Right;
winforms\Managed\System\WinForms\Layout\TableLayout.cs (1)
1242
elementBounds.
X
= cellBounds.X + (cellBounds.Right - elementBounds.Right);
winforms\Managed\System\WinForms\ListView.cs (1)
4717
rectInvalid.
X
= rectInvalid.Y = 0;
winforms\Managed\System\WinForms\PictureBox.cs (2)
455
result.
X
+= (result.Width - image.Width) / 2;
465
result.
X
= (ClientRectangle.Width - result.Width) /2;
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (1)
2155
rect.
X
+= cPaint + gridHost.GetValueStringIndent();
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (12)
2137
rect.
X
= ptOurLocation.X;
2143
rect.
X
= 1;
2147
rect.
X
= 1;
2151
rect.
X
= ptOurLocation.X + InternalLabelWidth;
2227
boundsScroll.
X
= sizeWindow.Width - boundsScroll.Width - 1;
2372
r.
X
= oldLabelWidth - requiredLabelPaintMargin;
2559
drawBounds.
X
-= 1;
4420
rect.
X
+= 1;
4439
rect.
X
+= paintIndent + 1;
4443
rect.
X
+= EDIT_INDENT + 1; // +1 to compensate for where GDI+ draws it's string relative to the rect.
4467
rect.
X
+= (LEFTDOT_SIZE * 2);
5862
newBounds.
X
= dragBaseRect.Left + delta;
winforms\Managed\System\WinForms\ScrollableControl.cs (2)
267
rect.
X
= displayRect.X;
871
displayRect.
X
= x;
winforms\Managed\System\WinForms\SplitContainer.cs (7)
910
r.
X
= splitterRect.X - Left;
1530
splitterRect.
X
= this.Location.X + SplitterDistanceInternal;
1533
splitterRect.
X
= this.Right - SplitterDistanceInternal - SplitterWidthInternal;
1558
r.
X
= panel1.Location.X + splitSize;
1561
r.
X
= Width - splitSize - SplitterWidthInternal;
1726
splitterRect.
X
= ((RightToLeft == RightToLeft.Yes) ? this.Width - splitterDistance - SplitterWidthInternal : this.Location.X + splitterDistance);
1733
splitterRect.
X
= this.Location.X;
winforms\Managed\System\WinForms\Splitter.cs (3)
463
bounds.
X
+= bounds.Width - splitSize;
677
r.
X
= bounds.X + splitSize;
681
r.
X
= bounds.X + bounds.Width - splitSize - r.Width;
winforms\Managed\System\WinForms\TabControl.cs (1)
440
r.
X
-= p.X;
winforms\Managed\System\WinForms\ToolStrip.cs (6)
857
rect.
X
+= (RightToLeft == RightToLeft.No) ? gripwidth : 0;
4291
gripRectangle.
X
= Math.Max(0, displayRect.X - Grip.GripThickness);
4296
gripRectangle.
X
= ClientRectangle.Right - gripRectangle.Width - Grip.Margin.Horizontal;
4297
gripRectangle.
X
+= Grip.Margin.Left;
4300
gripRectangle.
X
-= Grip.Margin.Right;
4305
gripRectangle.
X
= displayRect.Left;
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (5)
491
checkRectangle.
X
= width - checkRectangle.Right;
492
imageRectangle.
X
= width - imageRectangle.Right;
493
textRectangle.
X
= width - textRectangle.Right;
494
arrowRectangle.
X
= width - arrowRectangle.Right;
495
imageMarginBounds.
X
= width - imageMarginBounds.Right;
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (2)
1194
rect.
X
-= dropDownMenu.Padding.Left;
1195
rect.
X
= Math.Max(rect.X,0);
winforms\Managed\System\WinForms\ToolStripOverflowButton.cs (1)
129
bounds.
X
= 0;
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (5)
428
cachedBounds.
X
-= Math.Max(0, margins[i] - c.Margin.Left);
473
cachedBounds.
X
-= cellOffsets[i];
510
cachedBounds.
X
= Math.Max(0, cachedBounds.X - margins[i] - c.Margin.Top);
977
dragBounds.
X
-= Row.Margin.Left + ToolStripPanel.Padding.Left +4;
1476
dragBounds.
X
= x;
winforms\Managed\System\WinForms\ToolStripProfessionalRenderer.cs (9)
853
endGradient.
X
= bounds.Right - endGradient.Width;
877
endGradient.
X
+= 1;
1064
overflowBoundsFill.
X
+= overflowBoundsFill.Width - overflowButtonWidth + 1;
1142
fillRect.
X
= overflowBoundsFill.Right;
1173
topLeftShadowRect.
X
+= 1;
1181
topRightShadowRect.
X
-= 2; // was 2?
1186
topRightShadowRect2.
X
+= 1;
1283
bounds.
X
+= dropDownMenu.Padding.Left -2;
1289
bounds.
X
+= 2;
winforms\Managed\System\WinForms\ToolStripRenderer.cs (2)
871
imageRect.
X
+=1;
1034
baseRect.
X
= sizeGripBounds.Width - baseRect.X - baseRect.Width;
winforms\Managed\System\WinForms\ToolStripSeparator.cs (1)
468
rect.
X
= 2;
winforms\Managed\System\WinForms\ToolStripSystemRenderer.cs (1)
395
fillRect.
X
+= 2;
winforms\Managed\System\WinForms\TreeView.cs (1)
2739
bounds.
X
-= value;
winforms\Managed\System\WinForms\UpDownBase.cs (4)
826
backRect.
X
--;
842
backRect.
X
--;
1130
upDownButtonsBounds.
X
= totalClientWidth - upDownButtonsBounds.Right;
1131
upDownEditBounds.
X
= totalClientWidth - upDownEditBounds.Right;
winforms\Managed\System\WinForms\WinFormsUtils.cs (2)
112
bounds.
X
= constrainingBounds.Right - bounds.Width;
116
bounds.
X
= constrainingBounds.Left;
System.Windows.Forms.DataVisualization (30)
Common\General\Legend.cs (19)
827
cellPosition.
X
+= itemHalfSpacing.Width;
839
cellPosition.
X
+= this._subColumnSizes[index, subColumnIndex];
843
cellPosition.
X
+= this.GetSeparatorSize(this.ItemColumnSeparator).Width;
848
cellPosition.
X
+= this._subColumnSizes[columnIndex, subColumnIndex];
2459
separatorPosition.
X
= legendItem.Cells[0].cellPosition.Left;
2495
separatorRect.
X
+= this.GetBorderSize() + this._offset.Width;
2499
separatorRect.
X
+= this._horizontalSpaceLeft / 2;
2512
separatorRect.
X
+= this._subColumnSizes[columnIndex, subColumnIndex];
2522
separatorRect.
X
+= separatorRect.Width;
4042
legendPosition.
X
+= this.GetBorderSize();
4075
rect.
X
+= (int)(this._horizontalSpaceLeft / 2f);
4079
rect.
X
= prevRightLocation;
4118
fillRect.
X
= newX;
4137
fillRect.
X
-= this._itemColumnSpacingRel / 2;
4165
fillRect.
X
+= legendPosition.X - fillRect.X;
4214
separatorRect.
X
= columnStart;
4274
legendPosition.
X
+= this.GetBorderSize();
4317
rect.
X
+= this._offset.Width;
4318
rect.
X
+= this.GetBorderSize();
Common\General\LegendColumns.cs (8)
1447
this.cellPosition.
X
+= (int)(this.Margins.Left * singleWCharacterSize.Width / 100f);
2145
imagePosition.
X
= (int)((this.cellPosition.X + this.cellPosition.Width/2f) - imagePosition.Width/2f);
2153
imagePosition.
X
= this.cellPosition.X;
2159
imagePosition.
X
= this.cellPosition.Right - imagePosition.Width;
2250
seriesMarkerPosition.
X
= (int)((this.cellPosition.X + this.cellPosition.Width/2f) - seriesMarkerPosition.Width/2f);
2258
seriesMarkerPosition.
X
= this.cellPosition.X;
2264
seriesMarkerPosition.
X
= this.cellPosition.Right - seriesMarkerPosition.Width;
2314
imageScale.
X
= (int)((seriesMarkerPosition.X + seriesMarkerPosition.Width / 2f) - imageScale.Width / 2f);
WinForm\Utilities\AccessibleObject.cs (1)
316
rect.
X
= (int)(rect.X * this._chartScale.X);
WinForm\Utilities\Printing.cs (2)
255
marginPixel.
X
= (int)(marginPixel.X * (ev.Graphics.DpiX / 100.0f));
270
chartPosition.
X
+= (marginPixel.Width - chartPosition.Width) / 2;
System.Workflow.Activities (2)
Designers\ConditionalDesigner.cs (1)
100
diamondRectangle.
X
= bounds.Left + bounds.Width / 2 - diamondRectangle.Width / 2;
Designers\ListenDesigner.cs (1)
80
roundRectangle.
X
= bounds.Left + bounds.Width / 2 - roundRectangle.Width / 2;
System.Workflow.ComponentModel (57)
AuthoringOM\Design\ActivityDesigner.cs (6)
540
textRectangle.
X
= bounds.Left + ambientTheme.Margin.Width;
541
textRectangle.
X
+= (Image != null) ? designerTheme.ImageSize.Width + ambientTheme.Margin.Width : 0;
564
imageRectangle.
X
= bounds.Left + WorkflowTheme.CurrentTheme.AmbientTheme.Margin.Width;
3042
smartTagRectangle.
X
= rectangle.Left - margin.Width / 2;
3095
imageRectangle.
X
+= margin.Width / 2;
3102
dropDownRectangle.
X
+= imageSize.Width + 3 * margin.Width / 2;
AuthoringOM\Design\CompositeActivityDesigner.cs (6)
244
expandButtonRectangle.
X
+= (bounds.Width - ((3 * designerTheme.ExpandButtonSize.Width / 2) + anchorSize.Width)) / 2;
305
imageRectangle.
X
+= (bounds.Width - imageSize.Width) / 2;
309
imageRectangle.
X
+= (bounds.Width - (imageSize.Width + 3 * expandButtonSize.Width / 2)) / 2;
310
imageRectangle.
X
+= 3 * expandButtonSize.Width / 2;
355
textRectangle.
X
+= (bounds.Width - (3 * expandButtonSize.Width / 2 + textSize.Width)) / 2;
356
textRectangle.
X
+= 3 * expandButtonSize.Width / 2;
AuthoringOM\Design\DesignerHelpers.cs (4)
213
rectangle.
X
= destination.Left;
215
rectangle.
X
= destination.Right - rectangle.Width;
217
rectangle.
X
= destination.Left + destination.Width / 2 - rectangle.Width / 2;
546
bounds.
X
-= inflate.Width;
AuthoringOM\Design\DesignerWidgets.cs (17)
239
itemRectangle.
X
+= (itemRectangle.Width - itemRectangle.Height) / 2;
480
buttonRectangle.
X
= this.bounds.X + this.margin.Width;
487
buttonRectangle.
X
= this.bounds.X + this.margin.Width + buttonRectangle.Size.Width + this.itemStrip.Size.Width;
489
buttonRectangle.
X
= this.bounds.Right - buttonRectangle.Size.Width;
495
buttonRectangle.
X
= this.bounds.X + this.margin.Width;
715
itemRectangle.
X
= bounds.Left + (itemIndex * this.itemSize.Width) + ((itemIndex + 1) * this.margin.Width);
720
itemRectangle.
X
= bounds.Left + this.margin.Width;
1989
this.drawItems[i].TabItemRectangle.
X
= offset;
1996
this.drawItems[i].TabItemRectangle.
X
= 0;
2022
this.drawItems[i].TabItemRectangle.
X
-= offset;
2112
textRectangle.
X
+= imageRectangle.Width + TabMargin;
2537
rectangles[j].
X
= stripRectangle.Left + (i * (itemSize.Width + itemMargin.Width));
2564
itemRectangle.
X
= stripRectangle.Left + (itemIndex * itemSize.Width) + ((itemIndex + 1) * itemMargin.Width);
2740
imageRectangle.
X
= itemRectangle.Left + 2;
2831
stripRectangle.
X
= scrollLeftButton.Right + margin.Width;
2851
scrollRectangle.
X
= startLocation;
3466
destnRectangle.
X
= this.canvasBounds.Left + this.canvasBounds.Width / 2 - destnRectangle.Width / 2;
AuthoringOM\Design\FreeFormDesigner.cs (2)
935
bounds.
X
= Math.Min(minRectangle.Left, e.Bounds.Left);
1139
enclosingRectangle.
X
= leftTop.X;
AuthoringOM\Design\Glyphs\ConfigErrorGlyph.cs (1)
86
activatedBounds.
X
+= bounds.Width + ambientTheme.Margin.Width;
AuthoringOM\Design\MessageFilters\AutoScrollExpandMessageFilter.cs (4)
160
scrollIndicatorRectangles[0].
X
= indicatorMargins.Width;
165
scrollIndicatorRectangles[1].
X
= clientRectangle.Right - indicatorMargins.Width - scrollIndicatorSize.Width;
170
scrollIndicatorRectangles[2].
X
= (clientRectangle.Width - scrollIndicatorSize.Width) / 2;
175
scrollIndicatorRectangles[3].
X
= (clientRectangle.Width - scrollIndicatorSize.Width) / 2;
AuthoringOM\Design\MessageFilters\DynamicActionMessageFilter.cs (1)
582
rectangle.
X
= this.borderSize.Width + (buttonIndex * this.buttonSize.Width) + ((buttonIndex + 1) * this.margin.Width);
AuthoringOM\Design\MessageFilters\ResizingMessageFilter.cs (1)
292
designerBounds.
X
= x + delta;
AuthoringOM\Design\SequentialActivityDesigner.cs (1)
163
helpTextRectangle.
X
= connectors[0].Left + connectors[0].Width / 2 - this.helpTextSize.Width / 2;
AuthoringOM\Design\SequentialWorkflowHeaderFooter.cs (3)
119
bounds.
X
= designerBounds.Left + designerBounds.Width / 2 - bounds.Width / 2;
140
bounds.
X
= designerBounds.Left + designerBounds.Width / 2 - this.textSize.Width / 2;
164
bounds.
X
= designerBounds.Left + designerBounds.Width / 2 - bounds.Width / 2;
AuthoringOM\Design\SequentialWorkflowRootDesigner.cs (2)
369
imageRectangle.
X
-= SequentialWorkflowRootDesigner.HeaderFooterSizeIncr / 2;
453
imageRectangle.
X
-= SequentialWorkflowRootDesigner.HeaderFooterSizeIncr / 2;
AuthoringOM\Design\WorkflowLayouts.cs (6)
285
logicalRectangle.
X
-= offSet.Width;
293
logicalRectangle.
X
+= offSet.Width;
430
insersectedLogicalViewPort.
X
= pageLayoutData.LogicalPageBounds.X + deltaLocation.X;
465
insersectedPhysicalViewPort.
X
= pageLayoutData.ViewablePageBounds.X + deltaLocation.X;
564
viewPortBitmapArea.
X
= pageLayoutData.LogicalPageBounds.X - viewPortData.LogicalViewPort.X;
670
viewPortBitmapArea.
X
= intersectedViewPort.X - viewPortData.LogicalViewPort.X;
AuthoringOM\Design\WorkflowPrinting.cs (3)
275
layoutRectangle.
X
= headerFooterPrintData.PageBoundsWithoutMargin.Left;
280
layoutRectangle.
X
= headerFooterPrintData.PageBoundsWithoutMargin.Left + ((headerFooterPrintData.PageBoundsWithoutMargin.Width - layoutRectangle.Width) / 2); //align to the middle
285
layoutRectangle.
X
= headerFooterPrintData.PageBoundsWithoutMargin.Left + (headerFooterPrintData.PageBoundsWithoutMargin.Width - layoutRectangle.Width); //align to the right corner
System.WorkflowServices (6)
System\Workflow\Activities\Design\GradientPanel.cs (4)
84
frameRect.
X
-= Margin.Left;
134
arc.
X
= frame.Right - diameter;
138
arc.
X
= frame.Left;
150
arc.
X
= frame.Right - diameter;
System\Workflow\ComponentModel\Design\HighlightOverlayGlyph.cs (2)
90
arc.
X
= frame.Right - diameter;
94
arc.
X
= frame.Left;
989 references to X
System.Drawing (65)
commonui\System\Drawing\Advanced\GPRECT.cs (1)
30
X = rect.
X
;
commonui\System\Drawing\Advanced\GraphicsPath.cs (4)
803
AddArc(rect.
X
, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
1169
int status = SafeNativeMethods.Gdip.GdipAddPathRectangleI(new HandleRef(this, nativePath), rect.
X
, rect.Y,
1229
AddEllipse(rect.
X
, rect.Y, rect.Width, rect.Height);
1259
AddPie(rect.
X
, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
commonui\System\Drawing\Advanced\RectangleF.cs (1)
479
return new RectangleF(r.
X
, r.Y, r.Width, r.Height);
commonui\System\Drawing\Advanced\TextureBrush.cs (2)
165
dstRect.
X
,
276
dstRect.
X
,
commonui\System\Drawing\Bitmap.cs (1)
497
rect.
X
,
commonui\System\Drawing\BufferedGraphicsContext.cs (1)
164
this.targetLoc = new Point(targetRectangle.
X
, targetRectangle.Y);
commonui\System\Drawing\Graphics.cs (19)
1307
DrawArc(pen, rect.
X
, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
1411
DrawRectangle(pen, rect.
X
, rect.Y, rect.Width, rect.Height);
1546
DrawEllipse(pen, rect.
X
, rect.Y, rect.Width, rect.Height);
1607
DrawPie(pen, rect.
X
, rect.Y, rect.Width, rect.Height, startAngle,
2022
FillRectangle(brush, rect.
X
, rect.Y, rect.Width, rect.Height);
2208
FillEllipse(brush, rect.
X
, rect.Y, rect.Width, rect.Height);
2238
FillPie(brush, rect.
X
, rect.Y, rect.Width, rect.Height, startAngle,
2834
DrawImage(image, rect.
X
, rect.Y, rect.Width, rect.Height);
2879
DrawImage(image, rect.
X
, rect.Y);
3028
srcRect.
X
,
3088
destRect.
X
,
3092
srcRect.
X
,
3254
srcRect.
X
,
3310
destRect.
X
,
3365
destRect.
X
,
3958
int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.
X
, rect.Y,
4025
int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.
X
, rect.Y,
4064
int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.
X
, rect.Y,
4355
int status = SafeNativeMethods.Gdip.GdipIsVisibleRectI(new HandleRef(this, this.NativeGraphics), rect.
X
, rect.Y,
commonui\System\Drawing\Icon.cs (2)
432
imageX = imageRect.
X
;
443
targetX = targetRect.
X
;
commonui\System\Drawing\Printing\PrinterUnitConvert.cs (1)
83
Convert(value.
X
, fromUnit, toUnit),
commonui\System\Drawing\Rectangle.cs (28)
100
return new Point(
X
, Y);
189
return
X
;
216
return
X
+ Width;
263
return(comp.
X
== this.
X
) &&
277
return (left.
X
== right.
X
339
return this.
X
<= x &&
340
x < this.
X
+ this.Width &&
367
return(this.
X
<= rect.
X
) &&
368
((rect.
X
+ rect.Width) <= (this.
X
+ this.Width)) &&
379
return unchecked((int)((UInt32)
X
^
428
this.X = result.
X
;
439
int x1 = Math.Max(a.
X
, b.
X
);
440
int x2 = Math.Min(a.
X
+ a.Width, b.
X
+ b.Width);
458
return(rect.
X
< this.
X
+ this.Width) &&
459
(this.
X
< (rect.
X
+ rect.Width)) &&
473
int x1 = Math.Min(a.
X
, b.
X
);
474
int x2 = Math.Max(a.
X
+ a.Width, b.
X
+ b.Width);
508
return "{X=" +
X
.ToString(CultureInfo.CurrentCulture) + ",Y=" + Y.ToString(CultureInfo.CurrentCulture) +
commonui\System\Drawing\RectangleConverter.cs (2)
128
args[nArg++] = intConverter.ConvertToString(context, culture, rect.
X
);
142
rect.
X
, rect.Y, rect.Width, rect.Height});
commonui\System\Drawing\Region.cs (1)
966
int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionRectI(new HandleRef(this, nativeRegion), rect.
X
, rect.Y,
misc\GDI\WindowsRegion.cs (2)
135
this.nativeHandle = IntSafeNativeMethods.CreateRectRgn(rect.
X
, rect.Y, rect.
X
+rect.Width, rect.Y+rect.Height);
System.Web.DataVisualization (22)
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 (12)
529
legendPosition.
X
+ this._offset.Width + this.GetBorderSize(),
2471
separatorPosition.Width = right - separatorPosition.
X
;
2541
this._legendItemsAreaPosition.
X
+ this._legendItemsAreaPosition.Width / 2 - step * (float)Math.Floor(markerCount/2f),
4114
int newX = legendPosition.
X
;
4117
fillRect.Width += fillRect.
X
- legendPosition.
X
;
4163
if(fillRect.
X
< legendPosition.
X
)
4165
fillRect.X += legendPosition.
X
- fillRect.
X
;
4166
fillRect.Width -= (legendPosition.
X
- fillRect.
X
);
Common\General\LegendColumns.cs (7)
2145
imagePosition.X = (int)((this.cellPosition.
X
+ this.cellPosition.Width/2f) - imagePosition.Width/2f);
2153
imagePosition.X = this.cellPosition.
X
;
2250
seriesMarkerPosition.X = (int)((this.cellPosition.
X
+ this.cellPosition.Width/2f) - seriesMarkerPosition.Width/2f);
2258
seriesMarkerPosition.X = this.cellPosition.
X
;
2314
imageScale.X = (int)((seriesMarkerPosition.
X
+ seriesMarkerPosition.Width / 2f) - imageScale.Width / 2f);
2368
point1.X = seriesMarkerPosition.
X
;
2423
point.X = (int)(seriesMarkerPosition.
X
+ seriesMarkerPosition.Width/2f);
WebForm\ChartWebControl.cs (1)
1056
graphics.TranslateTransform(position.
X
, position.Y);
System.Web.Mobile (1)
UI\MobileControls\Design\Util\GroupLabel.cs (1)
43
int etchLeft = r.
X
;
System.Windows.Forms (832)
misc\GDI\WindowsGraphics2.cs (4)
92
Point p = new Point(bounds.
X
+sideLength/2, bounds.Y+sideLength/2);
252
bounds.Width = bounds.Width - bounds.
X
;
580
DrawRectangle(pen, rect.
X
, rect.Y, rect.Width, rect.Height);
618
FillRectangle(brush, rect.
X
, rect.Y, rect.Width, rect.Height);
misc\GDI\WindowsRegion.cs (2)
135
this.nativeHandle = IntSafeNativeMethods.CreateRectRgn(rect.
X
, rect.Y, rect.
X
+rect.Width, rect.Y+rect.Height);
winforms\Managed\System\WinForms\AccessibleObject.cs (2)
1363
pxLeft = bounds.
X
;
1379
pxLeft = bounds.
X
;
winforms\Managed\System\WinForms\AxHost.cs (3)
1578
if (oldBounds.
X
== x && oldBounds.Y == y && oldBounds.Width == width &&
4614
dest.left = source.
X
;
4616
dest.right = source.Width + source.
X
;
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (31)
179
Point p1 = new Point(bounds.
X
+ bounds.Width - 1, bounds.Y ); // upper inner right.
180
Point p2 = new Point(bounds.
X
, bounds.Y ); // upper left.
181
Point p3 = new Point(bounds.
X
, bounds.Y + bounds.Height - 1 ); // bottom inner left.
182
Point p4 = new Point(bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1 ); // inner bottom right.
273
Point p1 = new Point(bounds.
X
+ bounds.Width - 1, bounds.Y ); // upper inner right.
274
Point p2 = new Point(bounds.
X
, bounds.Y ); // upper left.
275
Point p3 = new Point(bounds.
X
, bounds.Y + bounds.Height - 1 ); // bottom inner left.
276
Point p4 = new Point(bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1 ); // inner bottom right.
343
Point p1 = new Point(bounds.
X
+ bounds.Width - 1, bounds.Y ); // upper inner right.
344
Point p2 = new Point(bounds.
X
, bounds.Y ); // upper left.
345
Point p3 = new Point(bounds.
X
, bounds.Y + bounds.Height - 1 ); // bottom inner left.
346
Point p4 = new Point(bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1 ); // inner bottom right.
509
g.FillRectangle(brush, r.
X
, r.Y, size, r.Height);
512
g.FillRectangle(brush, (r.
X
+ r.Width - size), r.Y, size, r.Height);
515
g.FillRectangle(brush, (r.
X
+ size), r.Y, (r.Width - size * 2), size);
518
g.FillRectangle(brush, (r.
X
+ size), (r.Y + r.Height - size), (r.Width - size * 2), size);
586
graphics.DrawImage(image, imageBounds.
X
, imageBounds.Y, image.Width, image.Height);
608
g.DrawRectangle(pen, r.
X
, r.Y, r.Width - 1, r.Height - 1);
1130
Rectangle textAdjusted = new Rectangle(layout.textBounds.
X
- 1, layout.textBounds.Y - 1,
1195
layout.checkBounds = new Rectangle(client.
X
, client.Y, checkSizeFull, checkSizeFull);
1206
layout.checkBounds.X = (field.
X
+field.Width) - layout.checkBounds.Width;
1209
layout.checkBounds.X = field.
X
+ (field.Width - layout.checkBounds.Width)/2;
1226
layout.checkArea.X = field.
X
;
1238
layout.checkArea.X = field.
X
+ field.Width - checkSizeFull;
1247
layout.checkArea.X = field.
X
;
1258
layout.checkArea.X = field.
X
;
1381
layout.textBounds.X = Math.Max(Math.Min(layout.textBounds.
X
, layout.field.
X
+ (layout.field.Width - layout.textBounds.Width)/2), layout.field.
X
);
1382
layout.textBounds.Width = textRight - layout.textBounds.
X
;
1387
layout.textBounds.X = layout.imageBounds.
X
+ layout.imageBounds.Width;
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (1)
98
NativeMethods.RECT r = new NativeMethods.RECT(bounds.
X
, bounds.Y, bounds.Right, bounds.Bottom);
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxStandardAdapter.cs (1)
40
int focusRectFixup = layout.focus.
X
& 0x1; // if it's odd, subtract one pixel for fixup.
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonBaseAdapter.cs (29)
104
wg.FillRectangle(fieldBrush, new Rectangle(bounds.
X
+ 2, bounds.Y + 2, 8, 8));
105
wg.FillRectangle(fieldBrush, new Rectangle(bounds.
X
+ 4, bounds.Y + 1, 4, 10));
106
wg.FillRectangle(fieldBrush, new Rectangle(bounds.
X
+ 1, bounds.Y + 4, 10, 4));
108
wg.DrawLine(borderPen, new Point(bounds.
X
+ 4, bounds.Y + 0), new Point(bounds.
X
+ 8, bounds.Y + 0));
109
wg.DrawLine(borderPen, new Point(bounds.
X
+ 4, bounds.Y + 11), new Point(bounds.
X
+ 8, bounds.Y + 11));
111
wg.DrawLine(borderPen, new Point(bounds.
X
+ 2, bounds.Y + 1), new Point(bounds.
X
+ 4, bounds.Y + 1));
112
wg.DrawLine(borderPen, new Point(bounds.
X
+ 8, bounds.Y + 1), new Point(bounds.
X
+ 10, bounds.Y + 1));
114
wg.DrawLine(borderPen, new Point(bounds.
X
+ 2, bounds.Y + 10), new Point(bounds.
X
+ 4, bounds.Y + 10));
115
wg.DrawLine(borderPen, new Point(bounds.
X
+ 8, bounds.Y + 10), new Point(bounds.
X
+ 10, bounds.Y + 10));
117
wg.DrawLine(borderPen, new Point(bounds.
X
+ 0, bounds.Y + 4), new Point(bounds.
X
+ 0, bounds.Y + 8));
118
wg.DrawLine(borderPen, new Point(bounds.
X
+ 11, bounds.Y + 4), new Point(bounds.
X
+ 11, bounds.Y + 8));
120
wg.DrawLine(borderPen, new Point(bounds.
X
+ 1, bounds.Y + 2), new Point(bounds.
X
+ 1, bounds.Y + 4));
121
wg.DrawLine(borderPen, new Point(bounds.
X
+ 1, bounds.Y + 8), new Point(bounds.
X
+ 1, bounds.Y + 10));
123
wg.DrawLine(borderPen, new Point(bounds.
X
+ 10, bounds.Y + 2), new Point(bounds.
X
+ 10, bounds.Y + 4));
124
wg.DrawLine(borderPen, new Point(bounds.
X
+ 10, bounds.Y + 8), new Point(bounds.
X
+ 10, bounds.Y + 10));
146
Rectangle vCross = new Rectangle (layout.checkBounds.
X
+ GetScaledNumber(offset, scale), layout.checkBounds.Y + GetScaledNumber(offset - 1, scale), GetScaledNumber(2, scale), GetScaledNumber(4, scale));
148
Rectangle hCross = new Rectangle (layout.checkBounds.
X
+ GetScaledNumber(offset - 1, scale), layout.checkBounds.Y + GetScaledNumber(offset, scale), GetScaledNumber(4, scale), GetScaledNumber(2, scale));
winforms\Managed\System\WinForms\CheckedListBox.cs (8)
694
Rectangle box = new Rectangle(bounds.
X
+ scaledListItemStartPosition,
703
box.X = bounds.
X
+ bounds.Width - idealCheckSize - scaledListItemStartPosition;
712
CheckBoxRenderer.DrawCheckBox(e.Graphics, new Point(box.
X
, box.Y), cbState, HandleInternal);
721
bounds.
X
+ idealCheckSize + (scaledListItemStartPosition * 2),
729
textBounds.X = bounds.
X
;
767
textBounds.
X
+ BORDER_SIZE,
849
bounds.
X
+ BORDER_SIZE,
1671
NativeMethods.POINT pt = new NativeMethods.POINT(rect.
X
, rect.Y);
winforms\Managed\System\WinForms\ComboBox.cs (11)
5935
innerBorder = new Rectangle(outerBorder.
X
+ 1, outerBorder.Y + 1, outerBorder.Width - dropDownButtonWidth - 2, outerBorder.Height - 2);
5936
innerInnerBorder = new Rectangle(innerBorder.
X
+ 1, innerBorder.Y + 1, innerBorder.Width - 2, innerBorder.Height - 2);
5996
g.DrawRectangle(outerBorderPen, new Rectangle(outerBorder.
X
, outerBorder.Y, dropDownRect.Width + 1, outerBorder.Height));
5999
g.DrawRectangle(outerBorderPen, new Rectangle(dropDownRect.
X
, outerBorder.Y, outerBorder.Right - dropDownRect.
X
, outerBorder.Height));
6006
g.DrawRectangle(outerBorderPen, new Rectangle(outerBorder.
X
, outerBorder.Y, dropDownRect.Width + 1, outerBorder.Height));
6009
g.DrawRectangle(outerBorderPen, new Rectangle(dropDownRect.
X
, outerBorder.Y, outerBorder.Right - dropDownRect.
X
, outerBorder.Height));
6040
g.DrawRectangle(innerPen, new Rectangle(outerBorder.
X
, outerBorder.Y, dropDownRect.Width + 1, outerBorder.Height));
6043
g.DrawRectangle(innerPen, new Rectangle(dropDownRect.
X
, outerBorder.Y, outerBorder.Right - dropDownRect.
X
, outerBorder.Height));
winforms\Managed\System\WinForms\CommonDialog.cs (1)
180
int x = screen.
X
+ (screen.Width - r.right + r.left) / 2;
winforms\Managed\System\WinForms\ContextMenuStrip.cs (3)
107
else if (bounds.
X
< screenBounds.
X
) {
112
Show(bounds.
X
, bounds.Y);
winforms\Managed\System\WinForms\Control.cs (22)
1376
SetBounds(value.
X
, value.Y, value.Width, value.Height, BoundsSpecified.All);
5810
cp.X -= parentClient.
X
;
6158
|| targetBounds.
X
< 0 || targetBounds.Y < 0) {
6180
SafeNativeMethods.BitBlt(new HandleRef(destGraphics, desthDC), targetBounds.
X
, targetBounds.Y, width, height,
6594
int sx = bounds.
X
;
6612
sx = (int)Math.Round(bounds.
X
* dx);
7313
NativeMethods.RECT rcArea = NativeMethods.RECT.FromXYWH(rc.
X
, rc.Y, rc.Width, rc.Height);
7322
NativeMethods.RECT.FromXYWH(rc.
X
, rc.Y, rc.Width,
9744
e.Graphics.DrawRectangle(pen, rectangle.
X
, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1);
9813
np.Graphics.TranslateClip(-shift.
X
, -shift.Y);
9822
np.Graphics.TranslateClip(shift.
X
, shift.Y);
11061
NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(r.
X
, r.Y, r.Width, r.Height);
11078
NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(r.
X
, r.Y, r.Width, r.Height);
11562
SetBoundsCore(rawScaledBounds.
X
, rawScaledBounds.Y, scaledSize.Width, scaledSize.Height, BoundsSpecified.All);
11877
x = adjustedBounds.
X
;
14520
if (locationProperty != null && !locationProperty.IsReadOnly && (bounds.
X
!= this.x || bounds.Y != this.y)) {
14536
SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, specified);
18262
bounds.Location = new Point(bounds.
X
, bounds.Y);
18270
ioleClientSite.OnPosRectChange(NativeMethods.COMRECT.FromXYWH(bounds.
X
, bounds.Y, bounds.Width, bounds.Height));
18361
adjustRect.left = posRect.
X
;
18363
adjustRect.right = posRect.Width + posRect.
X
;
18406
NativeMethods.RECT rcIntersect = NativeMethods.RECT.FromXYWH(intersect.
X
, intersect.Y, intersect.Width, intersect.Height);
winforms\Managed\System\WinForms\ControlPaint.cs (129)
121
if (bounds.
X
>= 0)
503
g.DrawImage(backgroundImage, imageRect, partOfImageToDraw.
X
, partOfImageToDraw.Y, partOfImageToDraw.Width,
509
Rectangle partOfImageToDraw = new Rectangle(new Point(imageRect.
X
- imageRectangle.
X
, imageRect.Y - imageRectangle.Y)
512
g.DrawImage(backgroundImage, imageRect, partOfImageToDraw.
X
, partOfImageToDraw.Y, partOfImageToDraw.Width,
609
topLineLefts[i] = bounds.
X
+ leftOffset;
610
topLineRights[i] = bounds.
X
+ bounds.Width - rightOffset - 1;
645
bottomLineLefts[i] = bounds.
X
+ leftOffset;
646
bottomLineRights[i] = bounds.
X
+ bounds.Width - rightOffset - 1;
736
graphics.DrawLine(pen, bounds.
X
+ i, leftLineTops[i], bounds.
X
+ i, leftLineBottoms[i]);
744
graphics.DrawLine(pen, bounds.
X
+ i, leftLineTops[i], bounds.
X
+ i, leftLineBottoms[i]);
752
graphics.DrawLine(pen, bounds.
X
+ i, leftLineTops[i], bounds.
X
+ i, leftLineBottoms[i]);
761
graphics.DrawLine(pen, bounds.
X
+ i, leftLineTops[i], bounds.
X
+ i, leftLineBottoms[i]);
771
graphics.DrawLine(pen, bounds.
X
+ i, leftLineTops[i], bounds.
X
+ i, leftLineBottoms[i]);
845
graphics.DrawLine(pen, bounds.
X
+ bounds.Width - 1 - i, rightLineTops[i], bounds.
X
+ bounds.Width - 1 - i, rightLineBottoms[i]);
853
graphics.DrawLine(pen, bounds.
X
+ bounds.Width - 1 - i, rightLineTops[i], bounds.
X
+ bounds.Width - 1 - i, rightLineBottoms[i]);
861
graphics.DrawLine(pen, bounds.
X
+ bounds.Width - 1 - i, rightLineTops[i], bounds.
X
+ bounds.Width - 1 - i, rightLineBottoms[i]);
870
graphics.DrawLine(pen, bounds.
X
+ bounds.Width - 1 - i, rightLineTops[i], bounds.
X
+ bounds.Width - 1 - i, rightLineBottoms[i]);
881
graphics.DrawLine(pen, bounds.
X
+ bounds.Width - 1 - i, rightLineTops[i], bounds.
X
+ bounds.Width - 1 - i, rightLineBottoms[i]);
896
DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, Border3DStyle.Etched,
906
DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, style,
917
DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, style, sides);
991
graphics.DrawLine(pen, bounds.
X
, bounds.Y,
992
bounds.
X
+ bounds.Width - 1, bounds.Y);
993
graphics.DrawLine(pen, bounds.
X
, bounds.Y,
994
bounds.
X
, bounds.Y + bounds.Height - 1);
998
graphics.DrawLine(pen, bounds.
X
, bounds.Y + bounds.Height - 1,
999
bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1);
1000
graphics.DrawLine(pen, bounds.
X
+ bounds.Width - 1, bounds.Y,
1001
bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1);
1005
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Y + 1,
1006
bounds.
X
+ bounds.Width - 2, bounds.Y + 1);
1007
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Y + 1,
1008
bounds.
X
+ 1, bounds.Y + bounds.Height - 2);
1013
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Y + bounds.Height - 2,
1014
bounds.
X
+ bounds.Width - 2, bounds.Y + bounds.Height - 2);
1015
graphics.DrawLine(pen, bounds.
X
+ bounds.Width - 2, bounds.Y + 1,
1016
bounds.
X
+ bounds.Width - 2, bounds.Y + bounds.Height - 2);
1029
graphics.DrawLine(pen, bounds.
X
, bounds.Y,
1030
bounds.
X
+ bounds.Width - 1, bounds.Y);
1031
graphics.DrawLine(pen, bounds.
X
, bounds.Y,
1032
bounds.
X
, bounds.Y + bounds.Height - 1);
1040
graphics.DrawLine(pen, bounds.
X
, bounds.Y + bounds.Height - 1,
1041
bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1);
1042
graphics.DrawLine(pen, bounds.
X
+ bounds.Width - 1, bounds.Y,
1043
bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1);
1056
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Y + 1,
1057
bounds.
X
+ bounds.Width - 2, bounds.Y + 1);
1058
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Y + 1,
1059
bounds.
X
+ 1, bounds.Y + bounds.Height - 2);
1069
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Y + bounds.Height - 2,
1070
bounds.
X
+ bounds.Width - 2, bounds.Y + bounds.Height - 2);
1071
graphics.DrawLine(pen, bounds.
X
+ bounds.Width - 2, bounds.Y + 1,
1072
bounds.
X
+ bounds.Width - 2, bounds.Y + bounds.Height - 2);
1100
graphics.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1112
DrawButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1129
DrawCaptionButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, button, state);
1147
DrawCheckBox(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1170
DrawComboButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1197
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Y, bounds.Right -2, bounds.Y);
1198
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Bottom - 1, bounds.Right -2, bounds.Bottom - 1);
1199
graphics.DrawLine(pen, bounds.
X
, bounds.Y + 1, bounds.
X
, bounds.Bottom -2);
1202
int midx = bounds.
X
+ bounds.Width/2;
1209
graphics.DrawLine(pen, bounds.
X
, midy, bounds.Right - 2, midy);
1216
graphics.DrawLine(pen, bounds.
X
+2, midy - 1, bounds.
X
+ 2, midy + 1);
1217
graphics.DrawLine(pen, bounds.
X
+3, midy - 2, bounds.
X
+ 3, midy + 2);
1262
Rectangle offsetRectangle = new Rectangle(rectangle.
X
+ 1, rectangle.Y + 1,
1304
graphics.DrawRectangle(pen, offsetRectangle.
X
, offsetRectangle.Y, offsetRectangle.Width - 1, offsetRectangle.Height - 1);
1338
(rectangle.
X
+ rectangle.Y) % 2 == 1,
1436
Rectangle fillRect = new Rectangle(rectangle.
X
+ 1, rectangle.Y + 1, rectangle.Width - 1, rectangle.Height - 1);
1677
graphics.DrawRectangle(pen, rectangle.
X
, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1);
1679
graphics.DrawRectangle(pen, rectangle.
X
, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1);
1688
graphics.DrawRectangle(pen, rectangle.
X
, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1);
1696
DrawMenuGlyph(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, glyph);
1706
DrawMenuGlyph(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, glyph, foreColor, backColor);
1733
DrawMixedCheckBox(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1750
DrawRadioButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1801
SafeNativeMethods.Rectangle(new HandleRef(null, dc), rectangle.
X
, rectangle.Y, rectangle.Right, rectangle.Bottom);
1849
DrawScrollButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, button, state);
1891
DrawSizeGrip(graphics, backColor, bounds.
X
, bounds.Y, bounds.Width, bounds.Height);
2014
SafeNativeMethods.PatBlt(new HandleRef(null, dc), rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, rop3);
2412
int x = bound.
X
;
2459
g.DrawLine(pen, bound.
X
, bound.Y, bound.
X
+ bound.Width - 1, bound.Y);
2460
g.DrawLine(pen, bound.
X
, bound.Y, bound.
X
, bound.Y + bound.Height - 1);
2463
g.DrawLine(SystemPens.ControlDark, bound.
X
+ bound.Width - 1, bound.Y, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2464
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y + bound.Height - 1, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2471
bound = new Rectangle(bound.
X
+ 1, bound.Y + 1, bound.Width - 1, bound.Height - 1);
2473
g.DrawLine(pen, bound.
X
, bound.Y, bound.
X
+ bound.Width - 1, bound.Y);
2474
g.DrawLine(pen, bound.
X
, bound.Y, bound.
X
, bound.Y + bound.Height - 1);
2477
g.DrawLine(SystemPens.ControlDark, bound.
X
+ bound.Width - 1, bound.Y, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2478
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y + bound.Height - 1, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2482
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y, bound.
X
+ bound.Width - 1, bound.Y);
2483
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y, bound.
X
, bound.Y + bound.Height - 1);
2485
g.DrawLine(pen, bound.
X
+ bound.Width - 1, bound.Y, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2486
g.DrawLine(pen, bound.
X
, bound.Y + bound.Height - 1, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2496
bound = new Rectangle(bound.
X
+ 1, bound.Y + 1, bound.Width - 1, bound.Height - 1);
2497
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y, bound.
X
+ bound.Width - 1, bound.Y);
2498
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y, bound.
X
, bound.Y + bound.Height - 1);
2500
g.DrawLine(pen, bound.
X
+ bound.Width - 1, bound.Y, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2501
g.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)
193
NativeMethods.RECT rcClip = NativeMethods.RECT.FromXYWH(value.
X
, value.Y, value.Width, value.Height);
436
imageX = imageRect.
X
;
447
targetX = targetRect.
X
;
winforms\Managed\System\WinForms\DataGrid.cs (44)
4061
caption.MouseDown(e.X - captionRect.
X
, e.Y - captionRect.Y);
4302
caption.MouseOver(e.X - captionRect.
X
, e.Y - captionRect.Y);
4478
right = new Rectangle(oldClientRectangle.
X
+ oldClientRectangle.Width - borderWidth,
4482
bottom = new Rectangle(oldClientRectangle.
X
,
4490
right = new Rectangle(newClientRectangle.
X
+ newClientRectangle.Width - borderWidth,
4498
bottom = new Rectangle(newClientRectangle.
X
,
4523
refresh.X = layout.Inside.
X
;
4703
Rectangle r = new Rectangle(inside.
X
, e.Y, inside.Width, 3);
4712
r.X = Math.Min(inside.Right - 3, r.
X
);
4713
r.X = Math.Max(r.
X
, 0);
4852
rightArea.Width -= left - rightArea.
X
;
4892
clip.Width = GetColBeg(col) - layout.Data.
X
- 2;
4898
clip.Width = layout.Data.
X
+ layout.Data.Width - leftEdge - 2;
4932
int x = rightToLeft ? Math.Max(e.X, layout.Data.
X
) : Math.Min(e.X, layout.Data.Right + 1);
4993
rightArea.Width -= rightToLeft ? rightArea.Right - left : left - rightArea.
X
;
4994
rightArea.X = rightToLeft ? layout.Data.
X
: left;
5765
int cx = layout.Data.
X
;
5773
region.Exclude(new Rectangle(rowExclude.
X
,
5860
SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.
X
, r.Y, r.Width, r.Height, NativeMethods.PATINVERT);
6196
Debug.Assert(x >= inside.
X
&& x < inside.Right, "x must be inside the horizontal bounds of layout.Data");
6203
int cx = inside.
X
- negOffset;
6205
while (cx < inside.Width + inside.
X
&& col < columnCount) {
6224
int offset = layout.Data.
X
- negOffset;
6323
Rectangle rowRect = new Rectangle(inside.
X
,
6431
cellBounds.X += layout.Data.
X
- negOffset;
6450
rowBounds.X = layout.Data.
X
;
6604
int x = layout.Data.
X
- negOffset;
6655
invalid.X = layout.RowHeaders.
X
;
6669
Rectangle inner = new Rectangle(rowRect.
X
+ r.
X
, rowRect.Y + r.Y, r.Width, r.Height);
6808
layout.ResizeBoxRect = new Rectangle(alignToRight ? data.
X
: data.Right,
6826
horizScrollBar.Bounds = new Rectangle(alignToRight ? layout.Inside.
X
+ layout.ResizeBoxRect.Width : layout.Inside.
X
,
6844
vertScrollBar.Bounds = new Rectangle(alignToRight ? layout.Data.
X
: layout.Data.Right,
7180
textBounds.X = boundingRect.
X
+ cx;
7244
Rectangle triBounds = new Rectangle(alignRight ? textBounds.
X
- textBounds.Height : textBounds.Right,
7303
g.FillRectangle(br, bounds.
X
, bounds.Y, bounds.Width + 2, 2);
7305
g.FillRectangle(br, bounds.
X
, bounds.Bottom - 2, bounds.Width + 2, 2);
7306
g.FillRectangle(br, bounds.
X
, bounds.Y, 2, bounds.Height + 2);
8628
NativeMethods.RECT scrollArea = NativeMethods.RECT.FromXYWH(rowsRect.
X
, rowsRect.Y, rowsRect.Width, rowsRect.Height);
8881
NativeMethods.RECT scrollRECT = NativeMethods.RECT.FromXYWH(underParentRows.
X
, underParentRows.Y - layout.ParentRows.Height, underParentRows.Width, underParentRows.Height + layout.ParentRows.Height);
9524
return rect.Right + rect.
X
- R1.Right;
9526
return R1.
X
;
9537
return rect.Right + rect.
X
- x;
winforms\Managed\System\WinForms\DataGridBoolColumn.cs (2)
156
return new Rectangle(bounds.
X
+((bounds.Width - idealCheckSize) /2),
161
return new Rectangle(Math.Max(0,bounds.
X
+((bounds.Width - idealCheckSize) /2)),
winforms\Managed\System\WinForms\DataGridCaption.cs (5)
480
bounds.
X
,
489
backButtonRect.X = bounds.
X
+ xOffset * 4 + downButtonWidth;
490
downButtonRect.X = bounds.
X
+ xOffset * 2;
563
g.DrawRectangle(this.textBorderPen, textBounds.
X
, textBounds.Y, textBounds.Width - 1, textBounds.Height - 1);
575
border = new Rectangle(textBounds.
X
, textBounds.Y + textPadding,
winforms\Managed\System\WinForms\DataGridParentRows.cs (25)
149
ret.X = layout.leftArrow.IsEmpty ? layout.data.
X
: layout.leftArrow.Right;
327
Rectangle r = new Rectangle(rect.
X
, rect.Y, rect.Width + borderWidth, rect.Height + borderWidth);
563
border = new Rectangle(bounds.
X
, bounds.Y + borderWidth,
664
layout.leftArrow = new Rectangle(bounds.
X
, bounds.Y, 15, bounds.Height);
726
g.DrawLine(gridLinePen, rowBounds.
X
, rowBounds.Bottom,
727
rowBounds.
X
+ paintedWidth,
774
int bmpX = bounds.
X
+ (bounds.Width - b.Width) / 2;
796
g.DrawLine(Pens.Black, bounds.
X
, bounds.Y, bounds.
X
+ bounds.Width, bounds.Y); // the top
797
g.DrawLine(Pens.White, bounds.
X
+ bounds.Width, bounds.Y, bounds.
X
+ bounds.Width, bounds.Y + bounds.Height); // the right side
798
g.DrawLine(Pens.White, bounds.
X
+ bounds.Width, bounds.Y + bounds.Height, bounds.
X
, bounds.Y + bounds.Height); // the right side
799
g.DrawLine(Pens.Black, bounds.
X
, bounds.Y + bounds.Height, bounds.
X
, bounds.Y); // the left side
897
paintBounds.X = bounds.
X
+ paintedWidth;
923
paintBounds.X = bounds.
X
+ cx;
942
paintBounds.X = bounds.
X
+ cx;
956
alignToRight ? paintBounds.
X
: paintBounds.Right,
958
alignToRight ? paintBounds.
X
: paintBounds.Right,
969
paintBounds.X = bounds.
X
+ cx;
1018
Debug.Assert(containedRect.
X
>= surroundingRect.
X
&& containedRect.Right <= surroundingRect.Right, "containedRect is not contained in surroundingRect");
1020
return surroundingRect.Right - containedRect.Right + surroundingRect.
X
;
1022
return containedRect.
X
;
winforms\Managed\System\WinForms\DataGridRelationshipRow.cs (32)
273
relRect.X += DataGrid.GetRowHeaderRect().
X
+ rowHeaderWidth;
295
outline.X = MirrorRectangle(outline.
X
, outline.Width, insideRowHeaders, alignToRight);
360
relRect.X += rowHeaders.
X
+ this.dgTable.RowHeaderWidth;
438
relRect.X += rowHeaders.
X
+ this.dgTable.RowHeaderWidth;
479
relRect.X += rowHeaders.
X
+ this.dgTable.RowHeaderWidth;
504
relRect.X += rowHeaders.
X
+ this.dgTable.RowHeaderWidth;
534
int dataWidthOffsetted = dataWidth + bounds.
X
- trueRowBounds.
X
;
542
Rectangle relationBounds = new Rectangle(trueRowBounds.
X
,
605
int rowHeaderBoundsX = MirrorRectangle(bounds.
X
,
609
if (!alignToRight) Debug.Assert(bounds.
X
== rowHeaderBoundsX, "what's up doc?");
619
int expandoBoxX = MirrorRectangle(bounds.
X
+ rowHeaderBounds.Width, expandoBoxWidth, bounds, alignToRight);
644
relRect.X = alignToRight ? bounds.Right - relRect.Width : bounds.
X
;
653
alignToRight ? bounds.Right - dataWidth : bounds.
X
,
662
g.DrawRectangle(SystemPens.ControlText, relRect.
X
, relRect.Y, relRect.Width - 1, relRect.Height - 1);
668
g.FillRectangle(GetBackBrush(), relRect.
X
, relRect.Y + cy, relRect.Width, relRect.Height - cy);
681
alignToRight ? bounds.
X
: bounds.
X
+ paintedWidth,
696
alignToRight ? bounds.Right - bWidth - paintedWidth : bounds.
X
+ paintedWidth - bWidth,
706
g.FillRectangle(GetBackBrush(), bounds.
X
, bounds.Y, bounds.Width, System.Windows.Forms.DataGridTableStyle.relationshipSpacing);
709
Rectangle textBounds = new Rectangle(bounds.
X
, bounds.Y + System.Windows.Forms.DataGridTableStyle.relationshipSpacing,
749
Rectangle outline = GetOutlineRect(bounds.
X
, bounds.Y);
760
g.DrawRectangle(drawPen, outline.
X
, outline.Y, outline.Width - 1, outline.Height - 1);
765
outline.
X
+ indent, outline.Y + outline.Width / 2,
771
outline.
X
+ outline.Height/2, outline.Y + indent,
772
outline.
X
+ outline.Height/2, outline.Bottom - indent - 1); // -1... hinting
776
points[0] = new Point(outline.
X
+ outline.Height/2, outline.Bottom);
780
points[2] = new Point(alignToRight ? bounds.
X
: bounds.Right,
806
return rowHeader.
X
- relRect.Width;
808
return relRect.
X
;
816
return rect.Right + rect.
X
- width - x;
911
bounds.X += rowBounds.
X
;
winforms\Managed\System\WinForms\DataGridRow.cs (7)
444
Rectangle bottomBorder = new Rectangle(alignToRight ? bounds.Right - dataWidth : bounds.
X
,
454
alignToRight ? bounds.
X
: bottomBorder.Right,
501
cellBounds.X = bounds.
X
+ cx;
517
alignToRight ? cellBounds.
X
- bWidth : cellBounds.Right,
528
alignToRight ? bounds.
X
: bounds.
X
+ cx,
561
Rectangle bmpRect = new Rectangle(alignToRight ? visualBounds.Right - xOffset - bmpSize.Width : visualBounds.
X
+ xOffset,
winforms\Managed\System\WinForms\DataGridToolTip.cs (1)
71
toolInfo.rect = NativeMethods.RECT.FromXYWH(iconBounds.
X
, iconBounds.Y, iconBounds.Width, iconBounds.Height);
winforms\Managed\System\WinForms\DataGridView.cs (1)
5163
Invalidate(new Rectangle(this.layout.Inside.
X
, this.layout.Inside.Y, this.RowHeadersWidth, this.ColumnHeadersHeight));
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (4)
355
marginWidths = rectThemeMargins.
X
+ rectThemeMargins.Width;
444
if (rectThemeMargins.
X
== -1)
448
rectThemeMargins.X = rectContent.
X
;
730
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
winforms\Managed\System\WinForms\DataGridViewCell.cs (49)
3593
this.DataGridView.RightToLeftInternal ? bounds.
X
: bounds.Right - dividerThickness,
3630
graphics.FillRectangle(this.DataGridView.GetCachedBrush(dividerHeightColor), bounds.
X
, bounds.Bottom - dividerThickness, bounds.Width, dividerThickness);
3646
graphics.DrawLine(penGridColor, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3650
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3654
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3669
graphics.DrawLine(penBackColor, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3670
graphics.DrawLine(penControlLightLight, bounds.
X
, y1, bounds.
X
, y2);
3685
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3686
graphics.DrawLine(penControlLightLight, bounds.
X
+ 1, y1, bounds.
X
+ 1, y2);
3701
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3702
graphics.DrawLine(penControlDark, bounds.
X
+ 1, y1, bounds.
X
+ 1, y2);
3774
graphics.DrawLine(penGridColor, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
3778
x1 = bounds.
X
;
3794
x1 = bounds.
X
;
3810
x1 = bounds.
X
;
3835
x1 = bounds.
X
;
3847
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
3852
x1 = bounds.
X
;
3864
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
3872
graphics.DrawLine(penGridColor, bounds.
X
, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1);
3881
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Bottom - 1, x2, bounds.Bottom - 1);
3885
x1 = bounds.
X
;
3896
x1 = bounds.
X
;
4330
iconBounds.X += cellBounds.
X
;
4356
rectPadding = new Rectangle(bounds.
X
, bounds.Y, cellStyle.Padding.Right, bounds.Height);
4365
rectPadding = new Rectangle(bounds.
X
, bounds.Y, cellStyle.Padding.Left, bounds.Height);
4508
this.DataGridView.EditingControl.Location = new Point(editingControlBounds.
X
, editingControlBounds.Y);
4554
if (cellClip.
X
- cellBounds.
X
>= borderAndPaddingWidths.
X
)
4556
xEditingPanel = cellClip.
X
;
4557
wEditingPanel -= cellClip.
X
- cellBounds.
X
;
4561
xEditingPanel = cellBounds.
X
+ borderAndPaddingWidths.
X
;
4562
wEditingPanel -= borderAndPaddingWidths.
X
;
4574
xEditingControl = cellBounds.
X
- cellClip.
X
;
4575
wEditingControl = cellBounds.Width - borderAndPaddingWidths.
X
- borderAndPaddingWidths.Width;
5154
rowRect.X = columnRect.
X
;
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (2)
845
preferredSize.Width += borderWidths.
X
;
1174
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (5)
703
preferredSize.Width += rectThemeMargins.
X
+ rectThemeMargins.Width;
794
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
881
valBounds.Width -= rectThemeMargins.
X
+ rectThemeMargins.Width;
885
valBounds.X += rectThemeMargins.
X
;
886
valBounds.Width -= rectThemeMargins.
X
+ rectThemeMargins.Width;
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (29)
755
Size adjustedSize = new Size(size.Width - borderAndPaddingWidths.
X
- borderAndPaddingWidths.Width,
772
if (x >= borderAndPaddingWidths.
X
+ 1 &&
773
x <= borderAndPaddingWidths.
X
+ dropWidth + 1)
2147
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
2217
g.DrawRectangle(SystemPens.ControlLightLight, new Rectangle(valBounds.
X
, valBounds.Y, valBounds.Width-1, valBounds.Height-1));
2367
g.DrawLine(pen, dropRect.
X
, dropRect.Y,
2368
dropRect.
X
+ dropRect.Width - 1, dropRect.Y);
2369
g.DrawLine(pen, dropRect.
X
, dropRect.Y,
2370
dropRect.
X
, dropRect.Y + dropRect.Height - 1);
2375
g.DrawLine(pen, valBounds.
X
, valBounds.Y + valBounds.Height - 1,
2376
valBounds.
X
+ valBounds.Width - 1, valBounds.Y + valBounds.Height - 1);
2377
g.DrawLine(pen, valBounds.
X
+ valBounds.Width - 1, valBounds.Y,
2378
valBounds.
X
+ valBounds.Width - 1, valBounds.Y + valBounds.Height - 1);
2389
g.DrawLine(pen, dropRect.
X
, dropRect.Y + dropRect.Height - 1,
2390
dropRect.
X
+ dropRect.Width - 1, dropRect.Y + dropRect.Height - 1);
2391
g.DrawLine(pen, dropRect.
X
+ dropRect.Width - 1, dropRect.Y,
2392
dropRect.
X
+ dropRect.Width - 1, dropRect.Y + dropRect.Height - 1);
2397
g.DrawLine(pen, valBounds.
X
, valBounds.Y,
2398
valBounds.
X
+ valBounds.Width - 2, valBounds.Y);
2399
g.DrawLine(pen, valBounds.
X
, valBounds.Y,
2400
valBounds.
X
, valBounds.Y + valBounds.Height - 1);
2413
g.DrawLine(pen, dropRect.
X
+ 1, dropRect.Y + 1,
2414
dropRect.
X
+ dropRect.Width - 2, dropRect.Y + 1);
2415
g.DrawLine(pen, dropRect.
X
+ 1, dropRect.Y + 1,
2416
dropRect.
X
+ 1, dropRect.Y + dropRect.Height - 2);
2427
g.DrawLine(pen, dropRect.
X
+ 1, dropRect.Y + dropRect.Height - 2,
2428
dropRect.
X
+ dropRect.Width - 2, dropRect.Y + dropRect.Height - 2);
2429
g.DrawLine(pen, dropRect.
X
+ dropRect.Width - 2, dropRect.Y + 1,
2430
dropRect.
X
+ dropRect.Width - 2, dropRect.Y + dropRect.Height - 2);
winforms\Managed\System\WinForms\DataGridViewHeaderCell.cs (4)
483
if (rectThemeMargins.
X
== -1)
487
rectThemeMargins.X = rectContent.
X
;
492
if (rectThemeMargins.
X
== 3 &&
651
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (11)
643
imgBounds = new Rectangle(bounds.
X
, bounds.Y, imgWidth, imgHeight);
650
imgBounds = new Rectangle(bounds.
X
, bounds.Y, Decimal.ToInt32((decimal)imgWidth * bounds.Height / imgHeight), bounds.Height);
655
imgBounds = new Rectangle(bounds.
X
, bounds.Y, bounds.Width, Decimal.ToInt32((decimal)imgHeight * bounds.Width / imgWidth));
668
imgBounds.X = bounds.
X
;
674
imgBounds.X = bounds.
X
;
680
imgBounds.X = bounds.
X
;
692
imgBounds.X = bounds.
X
;
698
imgBounds.X = bounds.
X
;
704
imgBounds.X = bounds.
X
;
717
imgBounds.X = bounds.
X
+ (bounds.Width - imgBounds.Width) / 2;
819
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (1)
1012
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (53)
2567
clip.X = this.layout.Data.
X
- this.mouseBarOffset - 1;
2568
clip.Width = leftEdge - this.Columns[columnIndex].MinimumThickness - this.layout.Data.
X
+ 3;
3026
r.X = Math.Max(inside.Left, r.
X
);
3027
r.X = Math.Min(r.
X
, inside.Right - r.Width);
3032
r.X = Math.Min(inside.Right - r.Width, r.
X
);
3033
r.X = Math.Max(r.
X
, inside.Left);
3044
r.X = Math.Max(inside.Left, r.
X
);
3048
r.X = Math.Min(inside.Right - 3, r.
X
);
3049
r.X = Math.Max(r.
X
, 0);
3057
Rectangle r = new Rectangle(inside.
X
, mouseY + this.mouseBarOffset - 1, inside.Width, 3);
4440
Debug.Assert(newLayout.Data.
X
>= 0);
5722
rectInsertionBar.X = Math.Max(this.layout.ColumnHeaders.
X
,
5771
SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.
X
, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT);
5772
SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.
X
, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT);
5773
SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.
X
, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT);
5774
SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.
X
+ r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT);
5791
SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.
X
, r.Y, r.Width, r.Height, NativeMethods.PATINVERT);
6150
newX = Math.Max(x + this.mouseBarOffset, this.layout.Data.
X
);
6330
delta = x - this.layout.RowHeaders.
X
- this.RowHeadersWidth + 1;
7157
width = rowRect.
X
- columnRect.
X
;
8272
cx = data.
X
;
8278
if ((this.RightToLeftInternal && cx < data.
X
) ||
8309
if ((this.RightToLeftInternal && cx < data.
X
) ||
8356
(this.RightToLeftInternal && cx - viewedColumnWidth < data.
X
)))
8360
displayWidth = cx - data.
X
;
8397
Debug.Assert(this.RightToLeftInternal || (x >= data.
X
- 1 && x < data.Right), "x must be inside the horizontal bounds of this.layout.Data");
8398
Debug.Assert(!this.RightToLeftInternal || (x >= data.
X
&& x <= data.Right), "x must be inside the horizontal bounds of this.layout.Data");
8400
if (!this.RightToLeftInternal && x == data.
X
- 1)
8416
cx = data.
X
;
8422
((!this.RightToLeftInternal && cx < data.Right) || (this.RightToLeftInternal && cx >= data.
X
)))
8461
((!this.RightToLeftInternal && cx < data.Right) || (this.RightToLeftInternal && cx >= data.
X
)))
8535
x = this.layout.Data.
X
;
9181
Rectangle rowRect = new Rectangle(data.
X
,
10193
Invalidate(new Rectangle(data.
X
, top, data.Width, bottom - top));
10479
rightToLeftInternal ? this.layout.Data.
X
- this.vertScrollBar.Width : this.layout.Data.Right,
10496
rightToLeftInternal ? this.layout.Inside.
X
+ this.layout.ResizeBoxRect.Width : this.layout.Inside.
X
,
10537
rightToLeftInternal ? this.layout.Data.
X
- this.vertScrollBar.Width : this.layout.Data.Right,
14969
rightArea.Width -= leftEdge - rightArea.
X
;
17880
right = new Rectangle(oldClientRectangle.
X
+ oldClientRectangle.Width - borderWidth,
17884
bottom = new Rectangle(oldClientRectangle.
X
,
17902
right = new Rectangle(newClientRectangle.
X
+ newClientRectangle.Width - borderWidth,
17911
bottom = new Rectangle(newClientRectangle.
X
,
17921
right = new Rectangle(oldGridFocusRectangle.
X
+ oldGridFocusRectangle.Width - 1,
17927
bottom = new Rectangle(oldGridFocusRectangle.
X
,
19919
cellBounds.X = bandBounds.
X
+ cx;
19996
cellBounds.X = scrollingBounds.
X
+ cx;
26178
while (xColumnRightEdge < this.layout.Data.
X
&& this.Columns.DisplayInOrder(firstDisplayedScrollingColumn, columnIndex))
26186
if (xColumnRightEdge < this.layout.Data.
X
)
26447
Debug.Assert(rowsRect.
X
> 0);
26470
NativeMethods.RECT scrollArea = NativeMethods.RECT.FromXYWH(rowsRect.
X
, rowsRect.Y, rowsRect.Width, rowsRect.Height);
26474
rowsRect.X = this.layout.Inside.
X
;
winforms\Managed\System\WinForms\DataGridViewRow.cs (2)
1631
cellBounds.X = rowBounds.
X
+ cx;
1718
cellBounds.X = dataBounds.
X
+ cx;
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (4)
676
borderAndPaddingHeights += rectThemeMargins.
X
;
786
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
857
valBounds.Height -= rectThemeMargins.
X
+ rectThemeMargins.Width;
858
valBounds.Y += rectThemeMargins.
X
;
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (2)
697
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
824
this.DataGridView.EditingControl.Location = new Point(editingControlBounds.
X
, editingControlBounds.Y);
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (10)
276
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
410
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
411
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
417
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
418
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
424
graphics.DrawLine(penControlDark, bounds.
X
+ 1, bounds.Y + 1, bounds.
X
+ 1, bounds.Bottom - 1);
425
graphics.DrawLine(penControlDark, bounds.
X
+ 1, bounds.Y + 1, bounds.Right - 1, bounds.Y + 1);
winforms\Managed\System\WinForms\DataGridViewUtilities.cs (6)
389
ptTextLocation.X = cellBounds.
X
;
394
ptTextLocation.X = cellBounds.
X
+ (cellBounds.Width - sizeText.Width) / 2;
404
ptTextLocation.X = cellBounds.
X
;
409
ptTextLocation.X = cellBounds.
X
+ (cellBounds.Width - sizeText.Width) / 2;
419
ptTextLocation.X = cellBounds.
X
;
424
ptTextLocation.X = cellBounds.
X
+ (cellBounds.Width - sizeText.Width) / 2;
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (2)
271
grayStrip.Bounds = new Rectangle(pageHostBounds.
X
, BUTTON_PAD,
292
bounds.X = bounds.Width + bounds.
X
- BUTTON_WIDTH;
winforms\Managed\System\WinForms\DrawListViewColumnHeaderEventArgs.cs (4)
178
graphics.DrawLine(SystemPens.ControlLightLight, r.
X
, r.Y, r.Right, r.Y);
179
graphics.DrawLine(SystemPens.ControlLightLight, r.
X
, r.Y, r.
X
, r.Bottom);
183
graphics.DrawLine(SystemPens.ControlDark, r.
X
+ 1, r.Bottom, r.Right, r.Bottom);
winforms\Managed\System\WinForms\DrawListViewItemEventArgs.cs (1)
173
resultBounds = new Rectangle(originalBounds.
X
, originalBounds.Y, textSize.Width, textSize.Height);
winforms\Managed\System\WinForms\ErrorProvider.cs (8)
996
windowBounds.
X
,
1074
SafeNativeMethods.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);
1193
iconBounds.X -= windowBounds.
X
;
1215
iconRegion.Region.Translate(iconBounds.
X
, iconBounds.Y);
1217
iconRegion.Region.Translate(-iconBounds.
X
, -iconBounds.Y);
1226
toolInfo.rect = NativeMethods.RECT.FromXYWH(iconBounds.
X
, iconBounds.Y, iconBounds.Width, iconBounds.Height);
1278
SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, windowBounds.
X
, windowBounds.Y,
winforms\Managed\System\WinForms\Form.cs (21)
1168
bounds.X -= screen.
X
;
1174
SetDesktopBounds(value.
X
, value.Y, value.Width, value.Height);
1192
loc.X -= screen.
X
;
2208
&& restoreBounds.
X
== -1
4023
cp.X = Math.Max(clientRect.
X
,clientRect.
X
+ (clientRect.Width - cp.Width)/2);
4039
cp.X = Math.Max(screenRect.
X
,screenRect.
X
+ (screenRect.Width - cp.Width)/2);
4461
if (p.X < screenRect.
X
)
4462
p.X = screenRect.
X
;
4463
else if (p.X + s.Width > screenRect.
X
+ screenRect.Width)
4464
p.X = screenRect.
X
+ screenRect.Width - s.Width;
4507
p.X = Math.Max(screenRect.
X
,screenRect.
X
+ (screenRect.Width - Width)/2);
5684
SetBounds(restoredWindowBounds.
X
, restoredWindowBounds.Y,
5939
base.SetBoundsCore(adjustedBounds.
X
, adjustedBounds.Y, adjustedBounds.Width, adjustedBounds.Height, BoundsSpecified.All);
6054
SetBounds(x + workingArea.
X
, y + workingArea.Y, width, height, BoundsSpecified.All);
6063
Location = new Point(workingArea.
X
+ x, workingArea.Y + y);
7217
mmi.ptMaxPosition.x = maximizedBounds.
X
;
7856
r.Width -= r.
X
;
7858
toolInfo.rect = NativeMethods.RECT.FromXYWH(r.
X
, r.Y, r.Width, r.Height);
winforms\Managed\System\WinForms\GroupBoxRenderer.cs (7)
200
clipRight.Width = clipMiddle.
X
- boxBounds.
X
;
206
clipRight.Width = boxBounds.Right - clipRight.
X
;
295
g.DrawLine(light, bounds.Left + 1, boxTop, textBounds.
X
- 2, boxTop);
296
g.DrawLine(dark, bounds.Left, boxTop - 1, textBounds.
X
- 3, boxTop - 1);
299
g.DrawLine(light, textBounds.
X
+ textBounds.Width + 1, boxTop, bounds.Width - 1, boxTop);
300
g.DrawLine(dark, textBounds.
X
+ textBounds.Width + 2, boxTop - 1, bounds.Width - 2, boxTop - 1);
winforms\Managed\System\WinForms\Label.cs (5)
1089
int xLoc = r.
X
+ 2;
1093
xLoc = (r.
X
+r.Width - 4)-pointImageSize.Width;
1096
xLoc = r.
X
+ (r.Width - pointImageSize.Width)/2;
1196
ControlPaint.DrawImageDisabled(g, image, loc.
X
, loc.Y, BackColor);
1199
g.DrawImage(image, loc.
X
, loc.Y, image.Width, image.Height);
winforms\Managed\System\WinForms\Layout\CommonProperties.cs (1)
279
bool xChangedButNotSpecified = ((specified & BoundsSpecified.X) == BoundsSpecified.None) & x != originalBounds.
X
;
winforms\Managed\System\WinForms\Layout\DockAndAnchorLayout.cs (10)
136
int left = layout.Left + displayRect.
X
;
138
int right = layout.Right + displayRect.
X
;
193
if (right < left || cachedBounds.Width != element.Bounds.Width || cachedBounds.
X
!= element.Bounds.
X
) {
278
Rectangle newElementBounds = new Rectangle(remainingBounds.
X
, remainingBounds.Y, elementSize.Width, elementSize.Height);
289
Rectangle newElementBounds = new Rectangle(remainingBounds.
X
, remainingBounds.Bottom - elementSize.Height, elementSize.Width, elementSize.Height);
300
Rectangle newElementBounds = new Rectangle(remainingBounds.
X
, remainingBounds.Y, elementSize.Width, elementSize.Height);
326
Rectangle newElementBounds = new Rectangle(remainingBounds.
X
, remainingBounds.Y, elementSize.Width, elementSize.Height);
576
anchorInfo.Left -= parentDisplayRect.
X
;
578
anchorInfo.Right -= parentDisplayRect.
X
;
winforms\Managed\System\WinForms\Layout\FlowLayout.cs (7)
112
displayRect.Width = Int32.MaxValue - displayRect.
X
;
119
Rectangle measureBounds = new Rectangle(displayRect.
X
, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height);
129
Rectangle rowBounds = new Rectangle(displayRect.
X
,
250
rowSize.Width = location.X - rowBounds.
X
;
352
Point pt = new Point(value.
X
, value.Y);
420
newBounds.X = DisplayRect.Right - bounds.
X
- bounds.Width + ElementProxy.Margin.Left - ElementProxy.Margin.Right;
427
Point pt = new Point(newBounds.
X
, newBounds.Y);
winforms\Managed\System\WinForms\Layout\LayoutUtils.cs (8)
212
if (rect1.
X
<= rect2.
X
&& rect1.
X
+ rect1.Width >= rect2.
X
+ rect2.Width) {
216
if (rect2.
X
<= rect1.
X
&& rect2.
X
+ rect2.Width >= rect1.
X
+ rect1.Width) {
winforms\Managed\System\WinForms\Layout\TableLayout.cs (1)
1242
elementBounds.X = cellBounds.
X
+ (cellBounds.Right - elementBounds.Right);
winforms\Managed\System\WinForms\LinkLabel.cs (3)
512
xLoc = clientRect.
X
;
525
xLoc = clientRect.
X
;
701
Rectangle visualRectangle = new Rectangle(clientRectWithPadding.
X
+ iLeftMargin,
winforms\Managed\System\WinForms\ListView.cs (1)
4715
rectInvalid.Width += rectInvalid.
X
;
winforms\Managed\System\WinForms\MDIClient.cs (2)
212
int sx = (int)Math.Round(bounds.
X
* dx);
214
int sw = (int)Math.Round((bounds.
X
+ bounds.Width) * dx - sx);
winforms\Managed\System\WinForms\NativeMethods.cs (1)
4036
this.left = r.
X
;
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (1)
749
NativeMethods.RECT scroll = NativeMethods.RECT.FromXYWH(rect.
X
, rect.Y, rect.Width, rect.Height);
winforms\Managed\System\WinForms\PropertyGrid.cs (4)
2348
ControlPaint.DrawReversibleLine(new Point(rc.
X
+i, rc.Y), new Point(rc.
X
+i, rc.Y+rc.Height), ctlDrawTo.BackColor);
2353
ControlPaint.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)
229
g.DrawLine(topLinePen, rect.
X
- 1, rect.Y - 1, rect.Width + 2, rect.Y - 1);
240
g.DrawLine(topLinePen, rect.
X
- 2, rect.Y - 1, rect.Width + 1, rect.Y - 1);
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (12)
1881
int stringX = rect.
X
+ this.PropertyLabelIndent;
1899
rect.Width = totalWidth - rect.
X
;
1907
g.FillRectangle(blank, rect.
X
, rect.Y, rect.Width, rect.Height);
1912
g.FillRectangle(stripeBrush, rect.
X
, rect.Y, borderWidth, rect.Height);
2063
g.DrawRectangle(p, outline.
X
, outline.Y, outline.Width - 1, outline.Height - 1);
2067
g.DrawLine(p, outline.
X
+ indent,outline.Y + outline.Height / 2,
2068
outline.
X
+ outline.Width - indent - 1,outline.Y + outline.Height/2);
2072
g.DrawLine(p, outline.
X
+ outline.Width/2, outline.Y + indent,
2073
outline.
X
+ outline.Width/2, outline.Y + outline.Height - indent - 1);
2140
Rectangle rectPaint = new Rectangle(rect.
X
+ 1, rect.Y + 1, gridHost.GetValuePaintWidth(), gridHost.GetGridEntryHeight() - 2);
2199
IntNativeMethods.RECT lpRect = IntNativeMethods.RECT.FromXYWH(rect.
X
+ (int)m.OffsetX + 2, rect.Y + (int)m.OffsetY - 1, rect.Width - 4, rect.Height);
2248
this.ValueToolTipLocation = new Point(rect.
X
+2, rect.Y-1);
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (1)
180
NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(itemRect.
X
, itemRect.Y, itemRect.Width, itemRect.Height);
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (19)
557
Point pt = PointToScreen( new Point( rect.
X
, rect.Y ) );
790
NativeMethods.POINT pt = new NativeMethods.POINT(rect.
X
, rect.Y);
1060
ctl.SetBounds(rectTarget.
X
,rectTarget.Y,
1275
Point newOrigin = new Point(rect.
X
, rect.Y);
1318
Point newOrigin = new Point(r.
X
, r.Y);
1586
return(r.Y << 16 | (r.
X
& 0xFFFF));
1641
loc.X = Math.Min(rectScreen.
X
+ rectScreen.Width - size.Width,
1642
Math.Max(rectScreen.
X
, loc.X + rect.
X
+ rect.Width - size.Width));
1720
loc.X = Math.Min(rectScreen.
X
+ rectScreen.Width - size.Width,
1721
Math.Max(rectScreen.
X
, loc.X + rect.
X
+ rect.Width - size.Width));
2373
r.Width -= r.
X
;
3207
gridEntry.OnMouseClick(me.X - r.
X
, me.Y - r.Y, me.Clicks, me.Button);
3263
if (onLabel && gridItem.GetLabelToolTipLocation(me.X - itemRect.
X
, me.Y - itemRect.Y) != InvalidPoint) {
3461
Point posStart = FindPosition(clipRect.
X
, clipRect.Y);
3462
Point posEnd = FindPosition(clipRect.
X
, clipRect.Y + clipRect.Height);
4428
Rectangle rectTarget = new Rectangle(rect.
X
+rect.Width-sizeBtn.Width,
5300
tipPt = curEntry.GetLabelToolTipLocation(mouseLoc.X - itemRect.
X
, mouseLoc.Y - itemRect.Y);
winforms\Managed\System\WinForms\Screen.cs (1)
328
NativeMethods.RECT rc = NativeMethods.RECT.FromXYWH(rect.
X
, rect.Y, rect.Width, rect.Height);
winforms\Managed\System\WinForms\ScrollableControl.cs (31)
186
return new Point(rect.
X
, rect.Y);
267
rect.X = displayRect.
X
;
557
int ctlRight = -display.
X
+ bounds.
X
+ bounds.Width + scrollMargin.Width;
644
displayRect = new Rectangle(displayRect.
X
, displayRect.Y, this.HorizontalScroll.Maximum, this.displayRect.Height);
647
displayRect = new Rectangle(displayRect.
X
, displayRect.Y, this.displayRect.Width, this.VerticalScroll.Maximum);
716
SetDisplayRectLocation(displayRect.
X
, -pos);
725
int pos = -displayRect.
X
;
863
if (displayRectangle.
X
!= x)
865
xDelta = x - displayRectangle.
X
;
876
NativeMethods.RECT rcClip = NativeMethods.RECT.FromXYWH(cr.
X
, cr.Y, cr.Width, cr.Height);
877
NativeMethods.RECT rcUpdate = NativeMethods.RECT.FromXYWH(cr.
X
, cr.Y, cr.Width, cr.Height);
946
int xCalc = displayRect.
X
;
958
if (bounds.
X
< xMargin) {
959
xCalc = displayRect.
X
+ xMargin - bounds.
X
;
961
else if (bounds.
X
+ bounds.Width + xMargin > client.Width) {
963
xCalc = client.Width - (bounds.
X
+ bounds.Width + xMargin - displayRect.
X
);
965
if (bounds.
X
+ xCalc - displayRect.
X
< xMargin) {
966
xCalc = displayRect.
X
+ xMargin - bounds.
X
;
1089
int x = displayRect.
X
;
1146
int x = displayRect.
X
;
1245
else if(-displayRect.
X
>= HorizontalScroll.minimum && -displayRect.
X
< HorizontalScroll.maximum) {
1246
HorizontalScroll.value = -displayRect.
X
;
1268
HorizontalScroll.Value = -displayRect.
X
;
1370
SetDisplayRectLocation(displayRect.
X
, -pos);
1392
int pos = -displayRect.
X
;
winforms\Managed\System\WinForms\SplitContainer.cs (9)
858
OnSplitterMoved(new SplitterEventArgs(SplitterRectangle.
X
+ SplitterRectangle.Width/2, SplitterRectangle.Y + SplitterRectangle.Height/2, SplitterRectangle.
X
, SplitterRectangle.Y));
910
r.X = splitterRect.
X
- Left;
1180
int xSplit = r.
X
;
1182
SplitterCancelEventArgs se = new SplitterCancelEventArgs(this.Left + SplitterRectangle.
X
+ SplitterRectangle.Width/2, this.Top + SplitterRectangle.Y + SplitterRectangle.Height/2, xSplit, ySplit);
1284
int xSplit = r.
X
;
1639
SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.
X
, r.Y, r.Width, r.Height, NativeMethods.PATINVERT);
2383
return new Rectangle(containerRectangle.
X
+ splitterRectangle.
X
, containerRectangle.Y + splitterRectangle.Y, splitterRectangle.Width, splitterRectangle.Height);
winforms\Managed\System\WinForms\Splitter.cs (5)
677
r.X = bounds.
X
+ splitSize;
681
r.X = bounds.
X
+ bounds.Width - splitSize - r.Width;
776
SafeNativeMethods.PatBlt(new HandleRef(ParentInternal, dc), r.
X
, r.Y, r.Width, r.Height, NativeMethods.PATINVERT);
894
int xSplit = r.
X
;
910
int xSplit = r.
X
;
winforms\Managed\System\WinForms\StatusBar.cs (2)
1110
if (x > bounds.
X
+ bounds.Width - SizeGripWidth) {
1888
ti.rect = NativeMethods.RECT.FromXYWH(tool.rect.
X
, tool.rect.Y, tool.rect.Width, tool.rect.Height);
winforms\Managed\System\WinForms\TabControl.cs (1)
414
NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(bounds.
X
, bounds.Y, bounds.Width, bounds.Height);
winforms\Managed\System\WinForms\TableLayoutPanel.cs (9)
426
startx = displayRect.
X
+ (cellBorderWidth / 2);
439
Rectangle insideCellBounds = new Rectangle(outsideCellBounds.
X
+ (cellBorderWidth + 1) / 2, outsideCellBounds.Y + (cellBorderWidth + 1)/ 2, outsideCellBounds.Width - (cellBorderWidth + 1) / 2, outsideCellBounds.Height - (cellBorderWidth + 1) / 2);
464
Rectangle tableBounds = new Rectangle(cellBorderWidth/2 + displayRect.
X
, cellBorderWidth/2 + displayRect.Y, displayRect.Width - cellBorderWidth, displayRect.Height - cellBorderWidth);
469
g.DrawLine(SystemPens.ControlDark, tableBounds.
X
, tableBounds.Y + tableBounds.Height - 1, tableBounds.
X
+ tableBounds.Width - 1, tableBounds.Y + tableBounds.Height - 1);
473
g.DrawLine(pen, tableBounds.
X
+ tableBounds.Width - 1, tableBounds.Y, tableBounds.
X
+ tableBounds.Width - 1, tableBounds.Y + tableBounds.Height - 1);
474
g.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)
718
Rectangle rectWithBorder = new Rectangle(inflateRect.
X
- 4, inflateRect.Y - 2, inflateRect.Width + 8, inflateRect.Height + 6);
747
base.SetBoundsCore (r.
X
, r.Y, r.Width, r.Height, specified == BoundsSpecified.None ? BoundsSpecified.None : BoundsSpecified.All);
winforms\Managed\System\WinForms\ToolStrip.cs (18)
269
CommonProperties.UpdateSpecifiedBounds(this, bounds.
X
, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location);
2344
Point midPointOfCurrent = new Point(selectedItem.Bounds.
X
+ selectedItem.Width / 2,
2365
Point otherItemMidLocation = new Point(otherItem.Bounds.
X
+ otherItem.Width/2, (down)? otherItem.Bounds.Top : otherItem.Bounds.Bottom);
2848
SafeNativeMethods.BitBlt(new HandleRef(this, desthDC), bounds.
X
, bounds.Y, bounds.Width, bounds.Height,
3724
clippingRect.Offset(-bounds.
X
, -bounds.Y);
3728
SafeNativeMethods.BitBlt(itemHDC, 0, 0, item.Size.Width, item.Size.Height, toolStripHDC, item.Bounds.
X
, item.Bounds.Y, NativeMethods.SRCCOPY);
3736
SafeNativeMethods.BitBlt(toolStripHDC, item.Bounds.
X
, item.Bounds.Y, item.Size.Width, item.Size.Height, itemHDC, 0, 0, NativeMethods.SRCCOPY);
3937
int start = lastInsertionMarkRect.
X
;
3964
new Point[] { new Point(lastInsertionMarkRect.
X
, horizontalBeamStart), new Point(lastInsertionMarkRect.Right-1, horizontalBeamStart), // first vertical line
3965
new Point(lastInsertionMarkRect.
X
, horizontalBeamStart+1), new Point(lastInsertionMarkRect.Right-1, horizontalBeamStart+1), //second vertical line
3969
new Point[] { new Point(lastInsertionMarkRect.
X
, start), new Point(lastInsertionMarkRect.
X
, start + widthOfBeam-1), //left line
3970
new Point(lastInsertionMarkRect.
X
+1, start+1), new Point(lastInsertionMarkRect.
X
+1, start + widthOfBeam-2), //second left line
4291
gripRectangle.X = Math.Max(0, displayRect.
X
- Grip.GripThickness);
4446
bool verticallyContained = clientBounds.Contains(clientBounds.
X
, item.Bounds.Top) &&
4447
clientBounds.Contains(clientBounds.
X
, item.Bounds.Bottom);
4783
SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, specified);
winforms\Managed\System\WinForms\ToolStripControlHost.cs (3)
58
CommonProperties.UpdateSpecifiedBounds(c, bounds.
X
, bounds.Y, bounds.Width, bounds.Height);
475
CommonProperties.UpdateSpecifiedBounds(control, specifiedBounds.
X
, specifiedBounds.Y, specifiedBounds.Width, specifiedBounds.Height);
485
CommonProperties.UpdateSpecifiedBounds(control, bounds.
X
, bounds.Y, bounds.Width, bounds.Height);
winforms\Managed\System\WinForms\ToolStripDropDown.cs (2)
1444
SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location);
1761
base.SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, specified);
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (11)
520
if (!displayRect.Contains(displayRect.
X
, nextItem.Bounds.Top)
521
|| !displayRect.Contains(displayRect.
X
, nextItem.Bounds.Bottom)) {
533
if ( (this.Items[index].Visible && displayRect.Contains(displayRect.
X
, this.Items[index].Bounds.Top - delta))
543
if (displayRect.Contains(displayRect.
X
, this.Items[index].Bounds.Bottom - delta)) {
669
if (displayRectangle.Contains(displayRectangle.
X
, adjustedLastItemBounds.Top)
670
&& displayRectangle.Contains(displayRectangle.
X
, adjustedLastItemBounds.Bottom)) {
690
if (displayRectangle.Contains(displayRectangle.
X
, adjustedLastItemBounds.Top)
691
&& displayRectangle.Contains(displayRectangle.
X
, adjustedLastItemBounds.Bottom)) {
814
if (this.indexOfFirstDisplayedItem == -1 && displayRectangle.Contains(displayRectangle.
X
, item.Bounds.Top)) {
822
UpScrollButton.Enabled = !displayRectangle.Contains(displayRectangle.
X
, minY);
823
DownScrollButton.Enabled = !displayRectangle.Contains(displayRectangle.
X
, maxY);
winforms\Managed\System\WinForms\ToolStripHighContrastRenderer.cs (12)
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);
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);
272
g.DrawLine(p, bounds.
X
, bounds.Y + indent, bounds.
X
, bounds.Height - 1);
399
g.DrawRectangle(SystemPens.Highlight, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
402
g.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)
1120
SetBounds(currentBounds.
X
, currentBounds.Y, currentBounds.Width, value);
2450
SetBounds(currentBounds.
X
, currentBounds.Y, value, currentBounds.Height);
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (1)
1195
rect.X = Math.Max(rect.
X
,0);
winforms\Managed\System\WinForms\ToolStripOverflow.cs (1)
101
SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, specified);
winforms\Managed\System\WinForms\ToolStripPanel.cs (7)
1083
Point endLocation = (Orientation == Orientation.Horizontal) ? new Point (clientLocation.X, row.Bounds.Y) : new Point (row.Bounds.
X
, clientLocation.Y);
1574
if (one.Bounds.
X
< two.Bounds.
X
) {
1578
if (one.Bounds.
X
== two.Bounds.
X
) {
1601
if (one.Bounds.
X
< two.Bounds.
X
) {
winforms\Managed\System\WinForms\ToolStripPanelCell.cs (1)
69
Debug.Assert(cachedBounds.
X
>= 0 && cachedBounds.Y >= 0, "cached bounds are outside of the client area, investigate");
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (4)
510
cachedBounds.X = Math.Max(0, cachedBounds.
X
- margins[i] - c.Margin.Top);
1295
if (Row.Cells[index].Bounds.
X
>= locationToDrag.X) {
1473
int x = previousRowBounds.
X
+ previousRowBounds.Width - (previousRowBounds.Width >> 2);
1475
dragBounds.Width += dragBounds.
X
- x;
winforms\Managed\System\WinForms\ToolStripProfessionalLowResolutionRenderer.cs (4)
53
g.DrawLine(p, bounds.
X
+ indent, bounds.Y, bounds.Width - 1, bounds.Y);
55
g.DrawLine(p, bounds.
X
+ indent, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1);
58
g.DrawLine(p, bounds.
X
, bounds.Y + indent, bounds.
X
, bounds.Height - 1);
winforms\Managed\System\WinForms\ToolStripProfessionalRenderer.cs (19)
194
overflowArrowRect.
X
,
196
overflowArrowRect.
X
,
199
overflowArrowRect.
X
+ 1,
201
overflowArrowRect.
X
+ 1,
335
g.DrawRectangle(p, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
347
g.DrawRectangle(p, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
523
g.DrawRectangle(p, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
566
g.DrawRectangle(p, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
921
g.DrawRectangle(p, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
931
g.DrawRectangle(SystemPens.Highlight, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
947
g.DrawRectangle(p, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1039
g.DrawRectangle(p, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1122
Point top1 = new Point(overflowBoundsFill.
X
- 2, 0);
1123
Point top2 = new Point(overflowBoundsFill.
X
- 1, 1);
1140
Rectangle fillRect = new Rectangle(overflowBoundsFill.
X
- 1, 0, 1, 1);
1147
g.FillRectangle(b, overflowBoundsFill.
X
, overflowBoundsFill.Top - 1, 1, 1);
1284
bounds.Width = dropDownMenu.Width - bounds.
X
;
1290
bounds.Width = dropDownMenu.Width - bounds.
X
- dropDownMenu.Padding.Right;
1396
g.DrawRectangle(p, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
winforms\Managed\System\WinForms\ToolStripRenderer.cs (2)
1034
baseRect.X = sizeGripBounds.Width - baseRect.
X
- baseRect.Width;
1036
baseRect.Offset(sizeGripBounds.
X
, sizeGripBounds.Bottom - 12 /*height of pyramid (10px) + 2px padding from bottom*/);
winforms\Managed\System\WinForms\ToolStripRenderEventArgs.cs (1)
129
return new Rectangle(itemBounds.
X
+1, 0, itemBounds.Width -2, 2);
winforms\Managed\System\WinForms\ToolStripSplitStackLayout.cs (1)
493
itemLocation.X = bounds.
X
;
winforms\Managed\System\WinForms\ToolStripSystemRenderer.cs (1)
413
g.DrawRectangle(p, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
winforms\Managed\System\WinForms\TrackBar.cs (1)
462
SetBounds(r.
X
, r.Y, r.Height, r.Width, BoundsSpecified.All);
winforms\Managed\System\WinForms\TrackBarRenderer.cs (4)
165
visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.
X
, bounds.Y, lineWidth, bounds.Height), Edges.Left, edgeStyle, EdgeEffects.None);
173
float x = bounds.
X
+ ((float)(numTicks - 1)) * inc;
196
visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.
X
, bounds.Y, bounds.Width, lineWidth), Edges.Top, edgeStyle, EdgeEffects.None);
205
visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.
X
, (int)Math.Round(y), bounds.Width, lineWidth), Edges.Top, edgeStyle, EdgeEffects.None);
winforms\Managed\System\WinForms\TreeView.cs (2)
2827
Point textLoc = new Point(bounds.
X
-1, bounds.Y); // required to center the text
3392
client = new Point(treeNode.Bounds.
X
, treeNode.Bounds.Y + treeNode.Bounds.Height / 2);
winforms\Managed\System\WinForms\Triangle.cs (2)
110
bounds.
X
+(bounds.Width - updnHeight)/2,
116
bounds.
X
+(bounds.Width - lrWidth)/2,
winforms\Managed\System\WinForms\VScrollProperties.cs (1)
44
return ParentControl.DisplayRectangle.
X
;
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (2)
306
lprcPosRect.left = this.Host.Bounds.
X
;
308
lprcPosRect.right = this.Host.Bounds.Width + this.Host.Bounds.
X
;
System.Windows.Forms.DataVisualization (25)
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 (12)
529
legendPosition.
X
+ this._offset.Width + this.GetBorderSize(),
2471
separatorPosition.Width = right - separatorPosition.
X
;
2541
this._legendItemsAreaPosition.
X
+ this._legendItemsAreaPosition.Width / 2 - step * (float)Math.Floor(markerCount/2f),
4114
int newX = legendPosition.
X
;
4117
fillRect.Width += fillRect.
X
- legendPosition.
X
;
4163
if(fillRect.
X
< legendPosition.
X
)
4165
fillRect.X += legendPosition.
X
- fillRect.
X
;
4166
fillRect.Width -= (legendPosition.
X
- fillRect.
X
);
Common\General\LegendColumns.cs (7)
2145
imagePosition.X = (int)((this.cellPosition.
X
+ this.cellPosition.Width/2f) - imagePosition.Width/2f);
2153
imagePosition.X = this.cellPosition.
X
;
2250
seriesMarkerPosition.X = (int)((this.cellPosition.
X
+ this.cellPosition.Width/2f) - seriesMarkerPosition.Width/2f);
2258
seriesMarkerPosition.X = this.cellPosition.
X
;
2314
imageScale.X = (int)((seriesMarkerPosition.
X
+ seriesMarkerPosition.Width / 2f) - imageScale.Width / 2f);
2368
point1.X = seriesMarkerPosition.
X
;
2423
point.X = (int)(seriesMarkerPosition.
X
+ seriesMarkerPosition.Width/2f);
WinForm\Utilities\AccessibleObject.cs (1)
316
rect.X = (int)(rect.
X
* this._chartScale.X);
WinForm\Utilities\Printing.cs (3)
153
graphics.TranslateTransform(position.
X
, position.Y);
255
marginPixel.X = (int)(marginPixel.
X
* (ev.Graphics.DpiX / 100.0f));
261
Rectangle chartPosition = new Rectangle(marginPixel.
X
, marginPixel.Y, _chartImage.Width, _chartImage.Height);
System.Workflow.Activities (2)
Designers\StateDesigner.cs (2)
802
int midHorz = bounds.
X
+ (bounds.Width / 2);
813
int midHorz = bounds.
X
+ (bounds.Width / 2);
System.Workflow.ComponentModel (41)
AuthoringOM\Design\DesignerHelpers.cs (5)
193
graphics.DrawImage(image, imageRectangle, source.
X
, source.Y, source.Width, source.Height, GraphicsUnit.Pixel, imageAttributes);
332
gridStart.X = viewableRectangle.
X
- (viewableRectangle.
X
% ambientTheme.GridSize.Width);
1028
gridStart.X = viewableRectangle.
X
- (viewableRectangle.
X
% gridUnit.Width);
AuthoringOM\Design\DesignerWidgets.cs (11)
139
using (Region clipRegion = new Region(new Rectangle(bounds.
X
, bounds.Y, bounds.Width + 1, bounds.Height + 1)))
196
using (Region clipRegion = new Region(new Rectangle(bounds.
X
, bounds.Y, bounds.Width + 1, bounds.Height + 1)))
480
buttonRectangle.X = this.bounds.
X
+ this.margin.Width;
487
buttonRectangle.X = this.bounds.
X
+ this.margin.Width + buttonRectangle.Size.Width + this.itemStrip.Size.Width;
488
if (buttonRectangle.
X
>= this.bounds.Right)
495
buttonRectangle.X = this.bounds.
X
+ this.margin.Width;
1226
graphics.DrawRectangle(SystemPens.ControlDarkDark, this.formRectangle.
X
, this.formRectangle.Y, this.formRectangle.Width - 1, this.formRectangle.Height - 1);
1239
graphics.FillRectangle(SystemBrushes.InactiveCaptionText, itemBounds.
X
, itemBounds.Y, itemBounds.Width - 1, itemBounds.Height - 1);
1240
graphics.DrawRectangle(SystemPens.ActiveCaption, itemBounds.
X
, itemBounds.Y, itemBounds.Width - 1, itemBounds.Height - 1);
1927
RectangleF tabTextRectangleF = new RectangleF(tabTextRectangle.
X
, tabTextRectangle.Y, tabTextRectangle.Width, tabTextRectangle.Height);
2849
int startLocation = (scrollButton == ScrollButton.Left) ? this.bounds.
X
: this.bounds.Right - scrollButtonSize.Width;
AuthoringOM\Design\MessageFilters\DragSelectionMessageFilter.cs (2)
121
e.Graphics.FillRectangle(dragRectangleBrush, dragRectangle.
X
, dragRectangle.Y, dragRectangle.Width - 1, dragRectangle.Height - 1);
122
e.Graphics.DrawRectangle(ambientTheme.SelectionForegroundPen, dragRectangle.
X
, dragRectangle.Y, dragRectangle.Width - 1, dragRectangle.Height - 1);
AuthoringOM\Design\MessageFilters\ResizingMessageFilter.cs (1)
287
x = Math.Max(x, clipBounds.
X
);
AuthoringOM\Design\ParallelActivityDesigner.cs (3)
289
dropTargets[0].Location = new Point(bounds.
X
, firstDesigner.Location.Y);
434
connectorPoints[0].X = dropTargetRectangle.
X
+ dropTargetRectangle.Width / 2;
452
connectorPoints[1].X = dropTargetRectangle.
X
+ dropTargetRectangle.Width / 2;
AuthoringOM\Design\SequentialActivityDesigner.cs (6)
411
DrawConnectors(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);
412
DrawConnectors(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);
567
grabHandles[0] = new Rectangle(bounds.
X
+ bounds.Width / 2 - ambientTheme.SelectionSize.Width / 2, bounds.Y, ambientTheme.SelectionSize.Width, ambientTheme.SelectionSize.Height);
568
grabHandles[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\WorkflowLayouts.cs (13)
422
Point deltaLocation = new Point(intersectedPhysicalViewPort.
X
- pageLayoutData.ViewablePageBounds.
X
, intersectedPhysicalViewPort.Y - pageLayoutData.ViewablePageBounds.Y);
430
insersectedLogicalViewPort.X = pageLayoutData.LogicalPageBounds.
X
+ deltaLocation.X;
457
Point deltaLocation = new Point(intersectedLogicalViewPort.
X
- pageLayoutData.LogicalPageBounds.
X
, intersectedLogicalViewPort.Y - pageLayoutData.LogicalPageBounds.Y);
465
insersectedPhysicalViewPort.X = pageLayoutData.ViewablePageBounds.
X
+ deltaLocation.X;
564
viewPortBitmapArea.X = pageLayoutData.LogicalPageBounds.
X
- viewPortData.LogicalViewPort.
X
;
662
bitmapDrawingPoint.X = pageLayoutData.ViewablePageBounds.
X
+ Math.Abs(pageLayoutData.LogicalPageBounds.
X
- intersectedViewPort.
X
);
670
viewPortBitmapArea.X = intersectedViewPort.
X
- viewPortData.LogicalViewPort.
X
;
System.WorkflowServices (1)
System\Workflow\Activities\Design\GradientPanel.cs (1)
88
Rectangle shadowRect = new Rectangle(frameRect.
X
, frameRect.Y + 6, frameRect.Width, frameRect.Height - 5);