3 writes to _parent
System.Windows.Forms (3)
System\Windows\Forms\Control.cs (3)
4164
_parent
= value;
4219
_parent
= value;
4744
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)
1332
cp.Parent =
_parent
is null ? IntPtr.Zero :
_parent
.InternalHandle;
2622
get =>
_parent
;
2625
if (
_parent
== value)
2636
_parent
?.Controls.Remove(this);
4182
if (oldVisible != newVisible && !(!oldVisible && newVisible &&
_parent
is null && !GetTopLevel()))
4308
if (
_parent
is not null)
4310
_parent
.Controls.SetChildIndex(this, 0);
4328
Enabled && Visible && (
_parent
is null ||
_parent
.CanProcessMnemonic());
4338
for (Control? ctl = this; ctl is not null; ctl = ctl.
_parent
)
4398
_parent
?.ChildGotFocus(child);
4492
if (
_parent
is not null)
4494
Rectangle parentClient =
_parent
.ClientRectangle;
4737
_parent
?.Controls.Remove(this);
5535
Control? p = ctl.
_parent
;
5588
ctl = ctl.
_parent
;
5598
Control? parent = ctl.
_parent
?? throw new InvalidOperationException(
5668
return ctl.ToolStripControlHost is not null ? GetNextControl(ctl.
_parent
, forward: false) : parent;
7151
if (
_parent
is not null && visible && !Created)
7576
_parent
?.ChildGotFocus(this);
8708
_parent
?.ProcessCmdKey(ref msg, keyData) ?? false;
8814
protected virtual bool ProcessDialogChar(char charCode) =>
_parent
?.ProcessDialogChar(charCode) ?? false;
8828
protected virtual bool ProcessDialogKey(Keys keyData) =>
_parent
?.ProcessDialogKey(keyData) ?? false;
8925
(
_parent
is not null &&
_parent
.ProcessKeyPreview(ref m)) || ProcessKeyEventArgs(ref m);
8942
protected virtual bool ProcessKeyPreview(ref Message m) =>
_parent
?.ProcessKeyPreview(ref m) ?? false;
9265
&& (FromHandle(parentHandle) is null ||
_parent
is null)
9885
if (!Contains(ctl) || (!nested && ctl.
_parent
!= this))
9913
&& (nested || ctl.
_parent
== this))
9915
if (ctl.
_parent
is ToolStrip)
9952
if (
_parent
is not null)
9954
_parent
.Controls.SetChildIndex(this, -1);
10218
_parent
?.UpdateChildZOrder(this);
10282
if (
_parent
is not null)
10329
else if (IsHandleCreated || (value &&
_parent
?.Created == true))
10374
using (new LayoutTransaction(
_parent
, this, PropertyNames.Visible))
10905
_parent
?.UpdateChildZOrder(this);
10913
if (!IsHandleCreated || !control.IsHandleCreated || control.
_parent
!= this)
10922
if (child.IsHandleCreated && child.
_parent
== this)
11295
_parent
?.UpdateChildZOrder(this);
12143
&&
_parent
is not null
12144
&& PInvoke.GetParent(this) ==
_parent
.InternalHandle
12150
_parent
.UpdateChildControlIndex(this);