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