3 writes to _parent
System.Windows.Forms (3)
System\Windows\Forms\Control.cs (3)
4232
_parent
= value;
4287
_parent
= value;
4812
child.
_parent
= null;
48 references to _parent
System.Windows.Forms (48)
System\Windows\Forms\Control.ControlCollection.cs (4)
63
if (value.
_parent
== Owner)
70
value.
_parent
?.Controls.Remove(value);
96
Control? oldParent = value.
_parent
;
106
if (oldParent != value.
_parent
&& (Owner._state & States.Created) != 0)
System\Windows\Forms\Control.cs (44)
1400
cp.Parent =
_parent
is null ? IntPtr.Zero :
_parent
.InternalHandle;
2690
get =>
_parent
;
2693
if (
_parent
== value)
2704
_parent
?.Controls.Remove(this);
4250
if (oldVisible != newVisible && !(!oldVisible && newVisible &&
_parent
is null && !GetTopLevel()))
4376
if (
_parent
is not null)
4378
_parent
.Controls.SetChildIndex(this, 0);
4396
Enabled && Visible && (
_parent
is null ||
_parent
.CanProcessMnemonic());
4406
for (Control? ctl = this; ctl is not null; ctl = ctl.
_parent
)
4466
_parent
?.ChildGotFocus(child);
4560
if (
_parent
is not null)
4562
Rectangle parentClient =
_parent
.ClientRectangle;
4805
_parent
?.Controls.Remove(this);
5603
Control? p = ctl.
_parent
;
5656
ctl = ctl.
_parent
;
5666
Control? parent = ctl.
_parent
?? throw new InvalidOperationException(
5736
return ctl.ToolStripControlHost is not null ? GetNextControl(ctl.
_parent
, forward: false) : parent;
7216
if (
_parent
is not null && visible && !Created)
7644
_parent
?.ChildGotFocus(this);
8764
_parent
?.ProcessCmdKey(ref msg, keyData) ?? false;
8870
protected virtual bool ProcessDialogChar(char charCode) =>
_parent
?.ProcessDialogChar(charCode) ?? false;
8884
protected virtual bool ProcessDialogKey(Keys keyData) =>
_parent
?.ProcessDialogKey(keyData) ?? false;
8981
(
_parent
is not null &&
_parent
.ProcessKeyPreview(ref m)) || ProcessKeyEventArgs(ref m);
8998
protected virtual bool ProcessKeyPreview(ref Message m) =>
_parent
?.ProcessKeyPreview(ref m) ?? false;
9327
&& (FromHandle(parentHandle) is null ||
_parent
is null)
9959
if (!Contains(ctl) || (!nested && ctl.
_parent
!= this))
9987
&& (nested || ctl.
_parent
== this))
9989
if (ctl.
_parent
is ToolStrip)
10026
if (
_parent
is not null)
10028
_parent
.Controls.SetChildIndex(this, -1);
10292
_parent
?.UpdateChildZOrder(this);
10356
if (
_parent
is not null)
10403
else if (IsHandleCreated || (value &&
_parent
?.Created == true))
10448
using (new LayoutTransaction(
_parent
, this, PropertyNames.Visible))
10979
_parent
?.UpdateChildZOrder(this);
10987
if (!IsHandleCreated || !control.IsHandleCreated || control.
_parent
!= this)
10996
if (child.IsHandleCreated && child.
_parent
== this)
11369
_parent
?.UpdateChildZOrder(this);
12214
&&
_parent
is not null
12215
&& PInvoke.GetParent(this) ==
_parent
.InternalHandle
12221
_parent
.UpdateChildControlIndex(this);