3 writes to _parent
System.Windows.Forms (3)
System\Windows\Forms\Control.cs (3)
4258
_parent
= value;
4313
_parent
= value;
4838
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)
1426
cp.Parent =
_parent
is null ? IntPtr.Zero :
_parent
.InternalHandle;
2716
get =>
_parent
;
2719
if (
_parent
== value)
2730
_parent
?.Controls.Remove(this);
4276
if (oldVisible != newVisible && !(!oldVisible && newVisible &&
_parent
is null && !GetTopLevel()))
4402
if (
_parent
is not null)
4404
_parent
.Controls.SetChildIndex(this, 0);
4422
Enabled && Visible && (
_parent
is null ||
_parent
.CanProcessMnemonic());
4432
for (Control? ctl = this; ctl is not null; ctl = ctl.
_parent
)
4492
_parent
?.ChildGotFocus(child);
4586
if (
_parent
is not null)
4588
Rectangle parentClient =
_parent
.ClientRectangle;
4831
_parent
?.Controls.Remove(this);
5629
Control? p = ctl.
_parent
;
5682
ctl = ctl.
_parent
;
5692
Control? parent = ctl.
_parent
?? throw new InvalidOperationException(
5762
return ctl.ToolStripControlHost is not null ? GetNextControl(ctl.
_parent
, forward: false) : parent;
7242
if (
_parent
is not null && visible && !Created)
7670
_parent
?.ChildGotFocus(this);
8790
_parent
?.ProcessCmdKey(ref msg, keyData) ?? false;
8896
protected virtual bool ProcessDialogChar(char charCode) =>
_parent
?.ProcessDialogChar(charCode) ?? false;
8910
protected virtual bool ProcessDialogKey(Keys keyData) =>
_parent
?.ProcessDialogKey(keyData) ?? false;
9007
(
_parent
is not null &&
_parent
.ProcessKeyPreview(ref m)) || ProcessKeyEventArgs(ref m);
9024
protected virtual bool ProcessKeyPreview(ref Message m) =>
_parent
?.ProcessKeyPreview(ref m) ?? false;
9353
&& (FromHandle(parentHandle) is null ||
_parent
is null)
9985
if (!Contains(ctl) || (!nested && ctl.
_parent
!= this))
10013
&& (nested || ctl.
_parent
== this))
10015
if (ctl.
_parent
is ToolStrip)
10052
if (
_parent
is not null)
10054
_parent
.Controls.SetChildIndex(this, -1);
10318
_parent
?.UpdateChildZOrder(this);
10397
if (
_parent
is not null)
10445
else if (IsHandleCreated || (value &&
_parent
?.Created == true))
10490
using (new LayoutTransaction(
_parent
, this, PropertyNames.Visible))
11021
_parent
?.UpdateChildZOrder(this);
11029
if (!IsHandleCreated || !control.IsHandleCreated || control.
_parent
!= this)
11038
if (child.IsHandleCreated && child.
_parent
== this)
11411
_parent
?.UpdateChildZOrder(this);
12256
&&
_parent
is not null
12257
&& PInvoke.GetParent(this) ==
_parent
.InternalHandle
12263
_parent
.UpdateChildControlIndex(this);