3 writes to layout
System.Windows.Forms (3)
winforms\Managed\System\WinForms\DataGridView.cs (1)
492
this.
layout
= new LayoutData();
winforms\Managed\System\WinForms\DataGridViewMethods.cs (2)
4445
this.
layout
= newLayout;
4450
this.
layout
= newLayout;
309 references to layout
System.Windows.Forms (309)
winforms\Managed\System\WinForms\DataGridView.cs (30)
493
this.
layout
.TopLeftHeader = Rectangle.Empty;
494
this.
layout
.ColumnHeaders = Rectangle.Empty;
495
this.
layout
.RowHeaders = Rectangle.Empty;
496
this.
layout
.ColumnHeadersVisible = true;
497
this.
layout
.RowHeadersVisible = true;
498
this.
layout
.ClientRectangle = this.ClientRectangle;
2140
this.
layout
.ColumnHeadersVisible = value;
3112
int displayWidth = this.
layout
.Data.Width;
3188
int displayHeight = this.
layout
.Data.Height;
3388
int widthNotVisible = this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - this.
layout
.Data.Width;
3409
Rectangle rectTmp = this.
layout
.Data;
3410
if (this.
layout
.ColumnHeadersVisible)
3413
rectTmp = Rectangle.Union(rectTmp, this.
layout
.ColumnHeaders);
3514
else if (value > 0 && (this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - this.
layout
.Data.Width) <= 0)
3761
if (this.
layout
.dirty && this.IsHandleCreated)
3765
return this.
layout
;
4279
this.
layout
.RowHeadersVisible = value;
4341
if (this.
layout
.RowHeadersVisible)
4812
if (!this.
layout
.dirty && !this.DesignMode)
4814
this.Invalidate(Rectangle.Union(this.
layout
.Data, this.
layout
.ColumnHeaders));
4815
this.Invalidate(this.
layout
.TopLeftHeader);
4867
if (!this.
layout
.dirty && !this.DesignMode)
4869
Invalidate(this.
layout
.Data);
4958
if (!this.
layout
.dirty && !this.DesignMode)
4960
Invalidate(this.
layout
.RowHeaders);
4970
return !this.
layout
.ColumnHeadersVisible &&
4980
return !this.
layout
.RowHeadersVisible &&
5163
Invalidate(new Rectangle(this.
layout
.Inside.X, this.
layout
.Inside.Y, this.RowHeadersWidth, this.ColumnHeadersHeight));
winforms\Managed\System\WinForms\DataGridViewMethods.cs (277)
508
int displayHeight = this.
layout
.Data.Height;
553
Debug.Assert(!this.
layout
.dirty);
555
if (this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) > this.
layout
.Data.Width)
563
int availableWidth = this.
layout
.Data.Width; // Width available for auto-filled columns
608
int maximumPossibleWidth = this.
layout
.Data.Width - imposedWidthSum;
756
int maximumPossibleWidth = this.
layout
.Data.Width - imposedWidthSum;
932
Debug.Assert(this.
layout
.Data.Width == this.
layout
.Inside.Width - this.
layout
.RowHeaders.Width - (this.SingleVerticalBorderAdded ? 1 : 0));
933
int availableWidth = this.
layout
.Data.Width - imposedWidthSum;
947
this.
layout
.Data.Height > totalVisibleFrozenHeight &&
948
SystemInformation.VerticalScrollBarWidth <= this.
layout
.Data.Width)
1308
int displayHeight = this.
layout
.Data.Height;
1741
if (this.
layout
.TopLeftHeader.Width > 0)
1745
preferredHeight = this.TopLeftHeaderCell.GetPreferredHeight(-1, this.
layout
.TopLeftHeader.Width);
1814
if (this.
layout
.TopLeftHeader.Width > 0)
1818
preferredHeight = this.TopLeftHeaderCell.GetPreferredHeight(-1, this.
layout
.TopLeftHeader.Width);
2014
if (this.
layout
.TopLeftHeader.Width > 0)
2018
preferredWidth = this.TopLeftHeaderCell.GetPreferredWidth(-1, this.
layout
.TopLeftHeader.Height);
2045
int displayHeight = this.
layout
.Data.Height, cy = 0;
2187
if (this.
layout
.TopLeftHeader.Width > 0)
2191
preferredWidth = this.TopLeftHeaderCell.GetPreferredWidth(-1, this.
layout
.TopLeftHeader.Height);
2218
int displayHeight = this.
layout
.Data.Height, cy = 0;
2461
Rectangle clip = Rectangle.Union(this.
layout
.ColumnHeaders, this.
layout
.Data);
2462
if (this.
layout
.TopLeftHeader.Width > 0)
2464
clip = Rectangle.Union(this.
layout
.TopLeftHeader, clip);
2484
Rectangle cursorClip = this.
layout
.ColumnHeaders;
2494
cursorClip.Width = Math.Min(frozenWidth, this.
layout
.Data.Width);
2503
else if (this.
layout
.Data.Width > frozenWidth + scrollingWidth)
2505
cursorClip.X += this.
layout
.Data.Width - frozenWidth - scrollingWidth;
2507
cursorClip.Width = Math.Min(scrollingWidth, this.
layout
.Data.Width);
2517
Invalidate(this.
layout
.ColumnHeaders);
2563
Rectangle clip = Rectangle.Union(this.
layout
.ColumnHeaders, this.
layout
.Data);
2567
clip.X = this.
layout
.Data.X - this.mouseBarOffset - 1;
2568
clip.Width = leftEdge - this.Columns[columnIndex].MinimumThickness - this.
layout
.Data.X + 3;
2579
clip.Width = this.
layout
.Data.Right - leftEdge - 1;
2775
Rectangle clip = Rectangle.Union(this.
layout
.RowHeaders, this.
layout
.Data);
2776
if (this.
layout
.TopLeftHeader.Width > 0)
2778
clip = Rectangle.Union(this.
layout
.TopLeftHeader, clip);
2808
Rectangle clip = Rectangle.Union(this.
layout
.RowHeaders, this.
layout
.Data);
2811
clip.Height = this.
layout
.Data.Y + this.
layout
.Data.Height - topEdge - 1;
3015
Rectangle r, inside = this.
layout
.ColumnHeaders;
3016
if (this.
layout
.TopLeftHeader.Width > 0)
3018
inside = Rectangle.Union(this.
layout
.TopLeftHeader, inside);
3040
Rectangle inside = this.
layout
.Data;
3056
Rectangle inside = this.
layout
.Data;
4188
if (this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) >= this.
layout
.Data.Width)
4244
int displayHeight = this.
layout
.Data.Height - totalVisibleFrozenHeight;
4328
LayoutData newLayout = new LayoutData(this.
layout
);
4329
Rectangle oldResizeRect = this.
layout
.ResizeBoxRect;
4355
if (this.
layout
.ColumnHeadersVisible)
4369
if (this.
layout
.RowHeadersVisible)
4385
if (this.
layout
.ColumnHeadersVisible)
4446
this.
layout
.dirty = false;
4451
Debug.Assert(!this.
layout
.dirty);
4459
if (!oldResizeRect.Equals(this.
layout
.ResizeBoxRect) && !this.
layout
.ResizeBoxRect.IsEmpty)
4461
Invalidate(this.
layout
.ResizeBoxRect);
4513
this.vertScrollBar.LargeChange = this.
layout
.Data.Height - totalVisibleFrozenHeight;
4558
int displayWidth = this.
layout
.Data.Width, cx = 0;
4701
Invalidate(this.
layout
.ColumnHeaders);
4750
int displayHeight = this.
layout
.Data.Height;
4915
columnX = this.
layout
.RowHeaders.Left - 1;
4919
columnX = this.
layout
.RowHeaders.Left;
4929
rowY = this.
layout
.ColumnHeaders.Top;
5531
int cxMax = this.
layout
.Data.Width, cx = 0;
5688
Rectangle rectInsertionBar = new Rectangle(0, this.
layout
.ColumnHeaders.Top, DATAGRIDVIEW_insertionBarWidth, this.
layout
.ColumnHeaders.Height);
5722
rectInsertionBar.X = Math.Max(this.
layout
.ColumnHeaders.X,
5728
this.
layout
.ColumnHeaders.Right - DATAGRIDVIEW_insertionBarWidth);
6085
int y = Math.Min(e.Y + this.mouseBarOffset, this.
layout
.Data.Bottom - 1);
6086
int delta = y - this.
layout
.ColumnHeaders.Y - this.ColumnHeadersHeight + 1;
6107
Invalidate(Rectangle.Union(this.
layout
.TopLeftHeader, this.
layout
.ColumnHeaders));
6150
newX = Math.Max(x + this.mouseBarOffset, this.
layout
.Data.X);
6155
newX = Math.Min(x + this.mouseBarOffset, this.
layout
.Data.Right - 1);
6324
x = Math.Max(e.X + this.mouseBarOffset, this.
layout
.Data.Left - 1);
6325
delta = this.
layout
.RowHeaders.Right - this.RowHeadersWidth - x - 1;
6329
x = Math.Min(e.X + this.mouseBarOffset, this.
layout
.Data.Right - 1);
6330
delta = x - this.
layout
.RowHeaders.X - this.RowHeadersWidth + 1;
6356
int y = Math.Min(e.Y + this.mouseBarOffset, this.
layout
.Data.Bottom - 1);
6421
int displayHeight = this.
layout
.Data.Height;
7115
columnRect = this.
layout
.RowHeaders;
7119
columnRect = this.
layout
.TopLeftHeader;
7139
rowRect = this.
layout
.ColumnHeaders;
7143
rowRect = this.
layout
.TopLeftHeader;
8262
Rectangle data = this.
layout
.Data;
8381
if (this.
layout
.ColumnHeadersVisible)
8383
columnRect.Height += this.
layout
.ColumnHeaders.Height;
8384
columnRect.Y -= this.
layout
.ColumnHeaders.Height;
8396
Rectangle data = this.
layout
.Data;
8531
x = this.
layout
.Data.Right-1;
8535
x = this.
layout
.Data.X;
8641
Rectangle rectScrollingArea = this.
layout
.Data;
8646
int emptyBackgroundWidth = Math.Max(0, this.
layout
.Data.Width - this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible));
8647
int emptyBackgroundHeight = Math.Max(0, this.
layout
.Data.Height - frozenVisibleRowsHeight - trailingScrollingRowsHeight);
8659
if (this.
layout
.RowHeadersVisible)
8662
rectScrollingArea = Rectangle.Union(rectScrollingArea, this.
layout
.RowHeaders);
8755
if (this.
layout
.ColumnHeadersVisible)
8758
rectScrollingArea = Rectangle.Union(rectScrollingArea, this.
layout
.ColumnHeaders);
8903
if (mouseY < this.
layout
.Data.Top)
8905
mouseY = this.
layout
.Data.Top+1;
8973
if (!this.RightToLeftInternal && mouseX < this.
layout
.Data.Left)
8975
mouseX = this.
layout
.Data.Left+1;
8978
else if (this.RightToLeftInternal && mouseX > this.
layout
.Data.Right)
8980
mouseX = this.
layout
.Data.Right-1;
9124
Rectangle data = this.
layout
.Data;
9185
if (this.
layout
.RowHeadersVisible)
9187
rowRect.Width += this.
layout
.RowHeaders.Width;
9190
rowRect.X -= this.
layout
.RowHeaders.Width;
9201
Rectangle data = this.
layout
.Data;
9286
int y = this.
layout
.Data.Y;
9381
if (!this.
layout
.Inside.Contains(x, y))
9398
if (this.
layout
.TopLeftHeader.Contains(x, y))
9404
hti.colStart = this.
layout
.TopLeftHeader.Right-1;
9408
hti.colStart = this.
layout
.TopLeftHeader.Left;
9410
hti.rowStart = this.
layout
.TopLeftHeader.Top;
9411
if ((!this.RightToLeftInternal && this.
layout
.TopLeftHeader.Right - x < DATAGRIDVIEW_columnSizingHotZone) ||
9412
(this.RightToLeftInternal && x - this.
layout
.TopLeftHeader.Left < DATAGRIDVIEW_columnSizingHotZone))
9420
hti.mouseBarOffset = this.
layout
.TopLeftHeader.Left - x - 1;
9424
hti.mouseBarOffset = this.
layout
.TopLeftHeader.Right - x - 1;
9428
else if (this.
layout
.TopLeftHeader.Top + this.
layout
.TopLeftHeader.Height - y < DATAGRIDVIEW_rowSizingHotZone)
9434
hti.mouseBarOffset = this.
layout
.TopLeftHeader.Top + this.
layout
.TopLeftHeader.Height - y - 1;
9441
if (this.
layout
.ColumnHeaders.Contains(x, y))
9452
hti.rowStart = this.
layout
.ColumnHeaders.Top;
9531
else if (this.
layout
.ColumnHeaders.Bottom - y < DATAGRIDVIEW_rowSizingHotZone)
9537
hti.mouseBarOffset = this.
layout
.ColumnHeaders.Bottom - y - 1;
9543
if (this.
layout
.RowHeaders.Contains(x, y))
9557
hti.colStart = this.
layout
.RowHeaders.Right-1;
9561
hti.colStart = this.
layout
.RowHeaders.Left;
9600
else if ((!this.RightToLeftInternal && this.
layout
.RowHeaders.Right - x < DATAGRIDVIEW_columnSizingHotZone) ||
9601
(this.RightToLeftInternal && x - this.
layout
.RowHeaders.Left < DATAGRIDVIEW_columnSizingHotZone))
9609
hti.mouseBarOffset = this.
layout
.RowHeaders.Left - x - 1;
9613
hti.mouseBarOffset = this.
layout
.RowHeaders.Right - x - 1;
9619
if (this.
layout
.Data.Contains(x, y))
10009
Invalidate(this.
layout
.Data);
10020
Invalidate(this.
layout
.Inside);
10075
data = this.
layout
.Data;
10349
totalVisibleWidth > this.
layout
.Data.Width && totalVisibleFrozenWidth < this.
layout
.Data.Width &&
10350
horizScrollBarHeight <= this.
layout
.Data.Height)
10352
int oldDataHeight = this.
layout
.Data.Height;
10353
this.
layout
.Data.Height -= horizScrollBarHeight;
10354
Debug.Assert(this.
layout
.Data.Height >= 0);
10356
if (totalVisibleWidth - this.
layout
.Data.Width <= vertScrollBarWidth ||
10357
this.
layout
.Data.Width - totalVisibleFrozenWidth <= vertScrollBarWidth)
10366
needHorizScrollbar = (totalVisibleFrozenWidth < this.
layout
.Data.Width - vertScrollBarWidth);
10373
if (this.
layout
.RowHeadersVisible)
10375
this.
layout
.RowHeaders.Height -= horizScrollBarHeight;
10376
Debug.Assert(this.
layout
.RowHeaders.Height >= 0);
10382
this.
layout
.Data.Height = oldDataHeight;
10393
this.
layout
.Data.Height > totalVisibleFrozenHeight &&
10394
vertScrollBarWidth <= this.
layout
.Data.Width)
10396
this.
layout
.Data.Width -= vertScrollBarWidth;
10397
Debug.Assert(this.
layout
.Data.Width >= 0);
10400
this.
layout
.Data.X += vertScrollBarWidth;
10402
if (this.
layout
.ColumnHeadersVisible)
10404
this.
layout
.ColumnHeaders.Width -= vertScrollBarWidth;
10405
Debug.Assert(this.
layout
.ColumnHeaders.Width >= 0);
10408
this.
layout
.ColumnHeaders.X += vertScrollBarWidth;
10420
totalVisibleWidth > this.
layout
.Data.Width && totalVisibleFrozenWidth < this.
layout
.Data.Width &&
10421
horizScrollBarHeight <= this.
layout
.Data.Height)
10424
if (this.
layout
.ColumnHeadersVisible)
10426
this.
layout
.ColumnHeaders.Width += vertScrollBarWidth;
10429
this.
layout
.ColumnHeaders.X -= vertScrollBarWidth;
10432
this.
layout
.Data.Width += vertScrollBarWidth;
10435
this.
layout
.Data.X -= vertScrollBarWidth;
10437
this.
layout
.Data.Height -= horizScrollBarHeight;
10438
Debug.Assert(this.
layout
.Data.Height >= 0);
10445
this.
layout
.Data.Height > totalVisibleFrozenHeight &&
10446
vertScrollBarWidth <= this.
layout
.Data.Width)
10448
this.
layout
.Data.Width -= vertScrollBarWidth;
10449
Debug.Assert(this.
layout
.Data.Width >= 0);
10452
this.
layout
.Data.X += vertScrollBarWidth;
10454
if (this.
layout
.ColumnHeadersVisible)
10456
this.
layout
.ColumnHeaders.Width -= vertScrollBarWidth;
10457
Debug.Assert(this.
layout
.ColumnHeaders.Width >= 0);
10460
this.
layout
.ColumnHeaders.X += vertScrollBarWidth;
10475
this.
layout
.ResizeBoxRect = new Rectangle();
10478
this.
layout
.ResizeBoxRect = new Rectangle(
10479
rightToLeftInternal ? this.
layout
.Data.X - this.vertScrollBar.Width : this.
layout
.Data.Right,
10480
this.
layout
.Data.Bottom,
10487
int widthNotVisible = totalVisibleWidth - this.
layout
.Data.Width;
10496
rightToLeftInternal ? this.
layout
.Inside.X + this.
layout
.ResizeBoxRect.Width : this.
layout
.Inside.X,
10497
this.
layout
.Data.Bottom,
10498
this.
layout
.Inside.Width - this.
layout
.ResizeBoxRect.Width,
10518
int vertScrollBarTop = this.
layout
.Data.Y;
10519
int vertScrollBarHeight = this.
layout
.Data.Height;
10520
if (this.
layout
.ColumnHeadersVisible)
10522
vertScrollBarTop = this.
layout
.ColumnHeaders.Y;
10523
vertScrollBarHeight += this.
layout
.ColumnHeaders.Height;
10535
this.vertScrollBar.LargeChange = this.
layout
.Data.Height - totalVisibleFrozenHeight;
10537
rightToLeftInternal ? this.
layout
.Data.X - this.vertScrollBar.Width : this.
layout
.Data.Right,
10669
Invalidate(Rectangle.Union(this.
layout
.TopLeftHeader, this.
layout
.ColumnHeaders));
13918
Invalidate(Rectangle.Union(this.
layout
.ColumnHeaders, this.
layout
.Data));
14364
Invalidate(Rectangle.Union(this.
layout
.TopLeftHeader, this.
layout
.ColumnHeaders));
14950
Rectangle rightArea = this.
layout
.Data;
14951
if (this.
layout
.ColumnHeadersVisible)
14953
rightArea = Rectangle.Union(rightArea, this.
layout
.ColumnHeaders);
15726
if (this.
layout
.dirty)
17116
if (this.
layout
.dirty)
17145
PaintBorder(g, clipRect, this.
layout
.ClientRectangle);
17146
if (clipRect.IntersectsWith(this.
layout
.ResizeBoxRect))
17148
g.FillRectangle(SystemBrushes.Control, this.
layout
.ResizeBoxRect);
17189
Rectangle gridRect = this.
layout
.Data;
17190
if (this.
layout
.RowHeadersVisible)
17192
gridRect = Rectangle.Union(gridRect, this.
layout
.RowHeaders);
17203
if (this.
layout
.ColumnHeadersVisible)
17205
gridRect = Rectangle.Union(gridRect, this.
layout
.ColumnHeaders);
17209
if (gridRect.Y == this.
layout
.Data.Y)
17877
Rectangle oldClientRectangle = this.
layout
.ClientRectangle;
17937
if (!this.
layout
.ResizeBoxRect.IsEmpty)
17939
Invalidate(this.
layout
.ResizeBoxRect);
17941
this.
layout
.ClientRectangle = newClientRectangle;
18650
Invalidate(Rectangle.Union(this.
layout
.TopLeftHeader, this.
layout
.RowHeaders));
19771
if (this.
layout
.ColumnHeadersVisible)
19773
rcBelowRows.Y += this.
layout
.ColumnHeaders.Height;
19774
rcBelowRows.Height -= this.
layout
.ColumnHeaders.Height;
19795
if (this.
layout
.RowHeadersVisible)
19799
rcNextRows.X += this.
layout
.RowHeaders.Width;
19801
rcNextRows.Width -= this.
layout
.RowHeaders.Width;
19890
if (g.IsVisible(this.
layout
.ColumnHeaders))
19893
bandBounds = cellBounds = this.
layout
.ColumnHeaders;
20046
if (this.
layout
.TopLeftHeader.Width > 0 &&
20047
(clipRect.IntersectsWith(this.
layout
.TopLeftHeader) || this.lastHeaderShadow != -1))
20053
g.SetClip(this.
layout
.TopLeftHeader);
20060
if (this.
layout
.ColumnHeadersVisible)
20063
columnHeadersClip = this.
layout
.ColumnHeaders;
20077
int columnHeadersHeight = this.
layout
.ColumnHeaders.Height;
20222
if (g.IsVisible(this.
layout
.TopLeftHeader))
20227
Rectangle cellBounds = this.
layout
.TopLeftHeader;
20232
this.
layout
.TopLeftHeader,
20298
if (this.
layout
!= null)
20300
this.
layout
.dirty = true;
20352
Rectangle editingZone = this.
layout
.Data;
25704
bool matchPositionInCurrencyManagerAfterRecreatingRows = !this.
layout
.dirty && !this.InSortOperation;
25989
Invalidate(Rectangle.Union(this.
layout
.TopLeftHeader, this.
layout
.ColumnHeaders));
26178
while (xColumnRightEdge < this.
layout
.Data.X && this.Columns.DisplayInOrder(firstDisplayedScrollingColumn, columnIndex))
26186
if (xColumnRightEdge < this.
layout
.Data.X)
26197
while (xColumnRightEdge > this.
layout
.Data.Right && this.Columns.DisplayInOrder(firstDisplayedScrollingColumn, columnIndex))
26205
if (xColumnRightEdge > this.
layout
.Data.Right)
26395
while (yRowBottomEdge > this.
layout
.Data.Bottom && rowIndex > firstDisplayedScrollingRow)
26399
if (yRowBottomEdge > this.
layout
.Data.Bottom)
26434
Rectangle rowsRect = this.
layout
.Data;
26435
if (this.
layout
.RowHeadersVisible)
26437
rowsRect = Rectangle.Union(rowsRect, this.
layout
.RowHeaders);
26474
rowsRect.X = this.
layout
.Inside.X;
26475
rowsRect.Y = this.
layout
.Inside.Y;
26476
rowsRect.Width = this.
layout
.RowHeaders.Width;
26813
if (this.
layout
.ColumnHeadersVisible)
28986
if (this.IsHandleCreated && this.
layout
.RowHeadersVisible)
29007
if (this.IsHandleCreated && this.
layout
.RowHeadersVisible)
29015
Invalidate(this.
layout
.RowHeaders);
29058
Rectangle bottomArea = this.
layout
.Data;
29059
if (this.
layout
.RowHeadersVisible)
29061
bottomArea = Rectangle.Union(bottomArea, this.
layout
.RowHeaders);
29122
Rectangle bottomArea = this.
layout
.Data;
29123
if (this.
layout
.RowHeadersVisible)
29125
bottomArea = Rectangle.Union(bottomArea, this.
layout
.RowHeaders);
winforms\Managed\System\WinForms\DataGridViewTopRowAccessibleObject.cs (2)
47
Rectangle rect = Rectangle.Union(this.owner.
layout
.ColumnHeaders, this.owner.
layout
.TopLeftHeader);