192 references to ClientRectangle
PresentationUI (2)
MS\Internal\Documents\DialogDivider.cs (2)
74
ClientRectangle
.Left,
76
ClientRectangle
.Right,
System.Windows.Forms (148)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
179
if (IsDegenerate(_owningControl.TryGetTarget(out Control? target) ? target.
ClientRectangle
: Rectangle.Empty))
System\Windows\Forms\Control.cs (11)
2304
private protected virtual bool IsHoveredWithMouse() =>
ClientRectangle
.Contains(PointToClient(MousePosition));
4581
Rectangle parentClient = _parent.
ClientRectangle
;
5968
NotifyInvalidate(
ClientRectangle
);
8007
cliprect = Rectangle.Intersect(
ClientRectangle
, cliprect);
8194
ClientRectangle
,
8235
Rectangle clientRectangle =
ClientRectangle
;
11228
if (
ClientRectangle
.Contains(client))
11852
clip =
ClientRectangle
;
11875
bufferedGraphics = BufferContext.Allocate(dc,
ClientRectangle
);
11880
Rectangle band =
ClientRectangle
;
11958
using PaintEventArgs e = new PrintPaintEventArgs(m, hdc,
ClientRectangle
);
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (7)
651
/// or may have flicker. Returning <see cref="Control.
ClientRectangle
"/> is safe for correct painting but may
666
return
ClientRectangle
;
689
/// or may have flicker. Returning <see cref="Control.
ClientRectangle
"/> is safe for correct painting but may
693
internal virtual Rectangle DownChangeRectangle =>
ClientRectangle
;
925
Rectangle r =
ClientRectangle
;
1241
ShowToolTip = (
ClientRectangle
.Width < preferredSize.Width ||
ClientRectangle
.Height < preferredSize.Height);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (3)
552
Rectangle bounds = Control.
ClientRectangle
;
559
Control.
ClientRectangle
,
609
Client = LayoutUtils.DeflateRect(Control.
ClientRectangle
, Control.Padding),
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (3)
38
Rectangle r = Control.
ClientRectangle
;
131
Rectangle r = Control.
ClientRectangle
;
224
Rectangle r = Control.
ClientRectangle
;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (3)
18
Rectangle r = Control.
ClientRectangle
;
64
Rectangle r = Control.
ClientRectangle
;
122
Rectangle r = Control.
ClientRectangle
;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (5)
58
Control.
ClientRectangle
,
99
Control.
ClientRectangle
,
125
PaintThemedButtonBackground(e, Control.
ClientRectangle
, up);
137
Rectangle bounds = Control.
ClientRectangle
;
187
Rectangle r = Control.
ClientRectangle
;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxFlatAdapter.cs (1)
72
PaintButtonBackground(e, Control.
ClientRectangle
, background: null);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (3)
27
PaintButtonBackground(e, Control.
ClientRectangle
, background: null);
62
Control.PaintBackground(e, Control.
ClientRectangle
);
105
PaintButtonBackground(e, Control.
ClientRectangle
, background: null);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxStandardAdapter.cs (1)
25
PaintButtonBackground(e, Control.
ClientRectangle
, null);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeAdapter.cs (3)
87
Control.
ClientRectangle
,
125
Control.
ClientRectangle
,
163
Control.
ClientRectangle
,
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonFlatAdapter.cs (1)
75
PaintButtonBackground(e, Control.
ClientRectangle
, background: null);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonPopupAdapter.cs (3)
22
PaintButtonBackground(e, Control.
ClientRectangle
, background: null);
51
PaintButtonBackground(e, Control.
ClientRectangle
, background: null);
76
PaintButtonBackground(e, Control.
ClientRectangle
, background: null);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonStandardAdapter.cs (1)
20
PaintButtonBackground(e, Control.
ClientRectangle
, background: null);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
240
if (!_owningComboBox.IsHandleCreated || IsDegenerate(_owningComboBox.
ClientRectangle
))
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
3800
Rectangle textBounds =
ClientRectangle
;
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (2)
31
_clientRect = comboBox.
ClientRectangle
;
60
return (combo.
ClientRectangle
== _clientRect && combo.RightToLeft == _origRightToLeft);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (5)
451
ClientRectangle =
ClientRectangle
458
_horizScrollBar.Top =
ClientRectangle
.Height - _horizScrollBar.Height;
466
_vertScrollBar.Left =
ClientRectangle
.Width - _vertScrollBar.Width;
2129
Rectangle rectDisplay =
ClientRectangle
;
3859
activate &=
ClientRectangle
.Contains(PointToClient(mouseCoord));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
4364
:
ClientRectangle
;
6018
if (!
ClientRectangle
.Contains(ptMouse))
16155
bool mouseOverToolTipControl = _toolTipControl.Activated &&
ClientRectangle
.Contains(PointToClient(MousePosition));
17452
_normalClientRectangle =
ClientRectangle
;
25992
if (!
ClientRectangle
.Contains(ptMouse))
30000
if (contextMenuStrip is not null &&
ClientRectangle
.Contains(client))
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (1)
172
if (!cellBounds.IntersectsWith(_owner.DataGridView.
ClientRectangle
))
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (1)
198
if (!rowBounds.IntersectsWith(_owningDataGridViewRow.DataGridView.
ClientRectangle
))
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
462
Rectangle textRectangle =
ClientRectangle
;
System\Windows\Forms\Controls\Labels\Label.cs (2)
1252
Rectangle face = LayoutUtils.DeflateRect(
ClientRectangle
, Padding);
1269
Rectangle clientRect =
ClientRectangle
;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (4)
145
private Rectangle ClientRectWithPadding => LayoutUtils.DeflateRect(
ClientRectangle
, Padding);
1154
Rectangle imageBounds = CalcImageRenderBounds(image,
ClientRectangle
, RtlTranslateAlignment(ImageAlign));
1165
DrawImage(e.Graphics, image,
ClientRectangle
, RtlTranslateAlignment(ImageAlign));
1375
using PaintEventArgs e = new(g,
ClientRectangle
);
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (2)
70
Rectangle visibleArea = _owningListBox.RectangleToScreen(_owningListBox.
ClientRectangle
);
219
int listBoxHeight = _owningListBox.
ClientRectangle
.Height;
System\Windows\Forms\Controls\ListView\ListView.cs (6)
2639
if (!
ClientRectangle
.IntersectsWith(itemBounds))
2703
if (!
ClientRectangle
.IntersectsWith(itemBounds))
2736
if (
ClientRectangle
.IntersectsWith(subItemBounds))
3712
if (!
ClientRectangle
.Contains(x, y))
5068
rectInvalid.Height +=
ClientRectangle
.Bottom - rectInvalid.Bottom;
5069
rectInvalid.Width +=
ClientRectangle
.Right - rectInvalid.Right;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (5)
341
Rectangle result = LayoutUtils.DeflateRect(
ClientRectangle
, Padding);
365
float ratio = Math.Min(
ClientRectangle
.Width / (float)imageSize.Width,
ClientRectangle
.Height / (float)imageSize.Height);
368
result.X = (
ClientRectangle
.Width - result.Width) / 2;
369
result.Y = (
ClientRectangle
.Height - result.Height) / 2;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.SnappableControl.cs (1)
40
Rectangle r =
ClientRectangle
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (2)
72
DDB_Draw3DBorder(pevent, Control.
ClientRectangle
, raised: true);
77
Rectangle rect = Control.
ClientRectangle
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
121
Rectangle currentClientRectangle =
ClientRectangle
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (4)
906
Rectangle clientRect =
ClientRectangle
;
1990
Rectangle rect =
ClientRectangle
;
2138
Rectangle r =
ClientRectangle
;
3614
Rectangle newRect =
ClientRectangle
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (2)
174
ClientRectangle
.Width <= PropertyGridView.SelectedGridEntry.GetValueTextWidth(Text, graphics, Font))
299
PositionTooltip(this, PropertyGridView.ToolTip,
ClientRectangle
);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
3446
g.FillRectangle(SystemBrushes.ControlDark,
ClientRectangle
);
3453
ClientRectangle
,
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
850
Rectangle rectangle =
ClientRectangle
;
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
2069
if (
ClientRectangle
.Contains(client))
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (3)
124
RECT clientRectangle = Owner.
ClientRectangle
;
247
Rectangle rect = Owner.
ClientRectangle
;
358
if (Owner is null || !Owner.IsHandleCreated || IsDegenerate(Owner.
ClientRectangle
))
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
213
Rectangle clientRect =
ClientRectangle
;
635
if (
ClientRectangle
.Contains(PointToClient(PARAM.ToPoint(m.LParamInternal))))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
3675
PaintTransparentBackground(e,
ClientRectangle
, transparentRegion);
4183
gripRectangle.X =
ClientRectangle
.Right - gripRectangle.Width - Grip.Margin.Horizontal;
4328
Rectangle clientBounds =
ClientRectangle
;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1207
if (!
ClientRectangle
.Contains(mea.Location))
1760
bounds.Intersect(toolStrip.
ClientRectangle
);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
323
if (!activeToolStrip.
ClientRectangle
.Contains(translatedLocation))
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (3)
157
return LayoutUtils.InflateRect(
ClientRectangle
, s_dragMargin);
674
CurrentFeedbackRect ??= new FeedbackRectangle(toolStripToDrag.
ClientRectangle
);
812
if (
ClientRectangle
.Contains(currentCursorLoc))
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (1)
111
Rectangle overlap = ToolStrip.
ClientRectangle
;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
211
Rectangle clientRectangle = toolStrip.
ClientRectangle
;
357
Rectangle clientRectangle = toolStrip.
ClientRectangle
;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (2)
182
Rectangle bounds = e.ToolStrip.
ClientRectangle
;
213
Rectangle bounds = e.ToolStrip.
ClientRectangle
;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
290
Rectangle bounds = toolStrip.
ClientRectangle
;
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
3420
if (
ClientRectangle
.Contains(client) && treeNode.ContextMenuStrip is not null)
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
523
Rectangle bounds =
ClientRectangle
;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (4)
152
Rectangle rect =
ClientRectangle
;
191
Rectangle rectUp =
ClientRectangle
, rectDown =
ClientRectangle
;
350
Rectangle clientRect =
ClientRectangle
;
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1359
if (
ClientRectangle
.Contains(client))
System\Windows\Forms\Form.AccessibleObject.cs (1)
22
? owner.RectangleToScreen(owner.
ClientRectangle
)
System\Windows\Forms\Form.cs (2)
3701
Rectangle clientRect = mdiclient is null ? Rectangle.Empty : mdiclient.
ClientRectangle
;
4467
e.GraphicsInternal.FillRectangle(SystemBrushes.AppWorkspace,
ClientRectangle
);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1557
g.FillRectangle(textureBrush,
ClientRectangle
);
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
340
protected override void OnPaintBackground(PaintEventArgs e) => PaintTransparentBackground(e,
ClientRectangle
);
428
Rectangle rect =
ClientRectangle
;
System\Windows\Forms\Scrolling\HScrollProperties.cs (1)
15
private protected override int GetPageSize(ScrollableControl parent) => parent.
ClientRectangle
.Width;
System\Windows\Forms\Scrolling\ScrollableControl.cs (16)
192
Rectangle rect =
ClientRectangle
;
303
Rectangle currentClient =
ClientRectangle
;
547
_displayRect =
ClientRectangle
;
608
Rectangle client =
ClientRectangle
;
624
Rectangle client =
ClientRectangle
;
741
Rectangle client =
ClientRectangle
;
787
RECT rcClip =
ClientRectangle
;
788
RECT rcUpdate =
ClientRectangle
;
822
Rectangle client =
ClientRectangle
;
846
Rectangle client =
ClientRectangle
;
1048
int minX =
ClientRectangle
.Width - width;
1049
int minY =
ClientRectangle
.Height - height;
1155
HorizontalScroll._largeChange =
ClientRectangle
.Width;
1185
VerticalScroll._largeChange =
ClientRectangle
.Height;
1257
Rectangle client =
ClientRectangle
;
1352
Rectangle client =
ClientRectangle
;
System\Windows\Forms\Scrolling\VScrollProperties.cs (1)
15
private protected override int GetPageSize(ScrollableControl parent) => parent.
ClientRectangle
.Height;
System.Windows.Forms.Design (35)
System\ComponentModel\Design\DesignerActionPanel.cs (2)
475
e.Graphics.FillRectangle(gradientBrush,
ClientRectangle
);
480
e.Graphics.FillRectangle(gradientBrush,
ClientRectangle
);
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
361
graphics.FillRectangle(brush,
ClientRectangle
);
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
309
Rectangle rectTabControl = _tabControl.TabPages[0].
ClientRectangle
;
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (3)
191
Rectangle rc =
ClientRectangle
;
207
Rectangle rc =
ClientRectangle
;
273
Rectangle rc =
ClientRectangle
;
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (3)
198
Rectangle controlRect = controlDesigner.Control.
ClientRectangle
;
535
Rectangle clipBounds = new(0, 0, rootControl.
ClientRectangle
.Width, rootControl.
ClientRectangle
.Height);
System\Windows\Forms\Design\ComponentTray.cs (3)
615
return RectangleToScreen(
ClientRectangle
);
1252
Cursor.Clip = RectangleToScreen(
ClientRectangle
);
2256
Rectangle rc =
ClientRectangle
;
System\Windows\Forms\Design\ControlDesigner.cs (4)
705
Rectangle parentRect = parent.RectangleToScreen(parent.
ClientRectangle
);
706
Rectangle controlRect = Control.RectangleToScreen(Control.
ClientRectangle
);
2042
using PaintEventArgs e = new(g, Control.
ClientRectangle
);
2259
Rectangle clientRectangle = Control.
ClientRectangle
;
System\Windows\Forms\Design\ControlDesigner.TransparentBehavior.cs (1)
48
_controlRect = control.RectangleToScreen(control.
ClientRectangle
);
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
1857
Rectangle rect = new(
ClientRectangle
.Location,
ClientRectangle
.Size);
System\Windows\Forms\Design\DesignerFrame.cs (1)
464
if (overlayControl.
ClientRectangle
.IntersectsWith(invalidateRect))
System\Windows\Forms\Design\DesignerUtils.cs (1)
527
Rectangle face = ctrl.
ClientRectangle
;
System\Windows\Forms\Design\DockEditor.DockUI.cs (1)
301
Rectangle rc =
ClientRectangle
;
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
971
if (!Destination.GetDesignerControl().
ClientRectangle
.Contains(convertedPoint))
System\Windows\Forms\Design\PanelDesigner.cs (1)
37
Rectangle rc = Control.
ClientRectangle
;
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
549
if (rootControl is not null && snappedBounds.IntersectsWith(rootControl.
ClientRectangle
))
2024
Rectangle clientRect = Control.
ClientRectangle
;
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
33
Rectangle rc = ctl.
ClientRectangle
;
System\Windows\Forms\Design\SplitterDesigner.cs (1)
26
Rectangle rectangle = control.
ClientRectangle
;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (3)
155
Rectangle rectangle = control.
ClientRectangle
;
165
Rectangle rectangle = control.
ClientRectangle
;
181
Rectangle rectangle = control.
ClientRectangle
;
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
866
Rectangle bounds = label.
ClientRectangle
;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
237
Rectangle rc = Control.
ClientRectangle
;
462
paintEvent.Graphics.FillRectangle(brush, Control.
ClientRectangle
);
WindowsFormsIntegration (7)
System\Windows\Integration\HostUtils.cs (7)
173
if (control.
ClientRectangle
.Width == 0 || control.
ClientRectangle
.Height == 0)
178
SD.Bitmap bitmap = new SD.Bitmap(control.
ClientRectangle
.Width, control.
ClientRectangle
.Height);
181
using (PaintEventArgs args = new PaintEventArgs(g, control.
ClientRectangle
))
196
SD.Bitmap returnBitmap = new SD.Bitmap(childElementHost.
ClientRectangle
.Width, childElementHost.
ClientRectangle
.Height);