2 writes to ContainingControl
System.Windows.Forms.Tests (2)
System\Windows\Forms\AxHostTests.cs (2)
423ContainingControl = value 428control.ContainingControl = value;
37 references to ContainingControl
System.Windows.Forms (21)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (2)
434if (axHost.ContainingControl?.CreateAxContainer() is { } container) 503if (site.ContainingControl is { } container)
System\Windows\Forms\ActiveX\AxHost.cs (19)
409ContainerControl? containingControl = ContainingControl; 419ContainerControl? containingControl = ContainingControl; 923ContainerControl? containingControl = ContainingControl; 1387if (!Visible && ContainingControl is not null && ContainingControl.Visible) 1469ContainerControl? containingControl = ContainingControl; 1598ContainerControl? container = ContainingControl; 1759hwnd = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 1936/// The <see cref="ContainingControl"/> property value can be different from the <see cref="Control.Parent"/> 1937/// property. The <see cref="ContainingControl"/> represented by this property is the ActiveX control's 1939/// the <see cref="GroupBox"/> is contained on a <see cref="Form"/>, then the <see cref="ContainingControl"/> 1985private bool ShouldSerializeContainingControl() => ContainingControl != ParentInternal; 2970hWndOwner = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 3025HWND handle = ContainingControl is null ? HWND.Null : ContainingControl.HWND; 3427if (ContainingControl is { } container) 3494if (ContainingControl is not { } container)
System.Windows.Forms.Tests (16)
System\Windows\Forms\AxHostTests.cs (16)
52Assert.Null(control.ContainingControl); 146Assert.Null(control.ContainingControl); 357Assert.Same(grandparent, control.ContainingControl); 360Assert.Same(control.ContainingControl, control.ContainingControl); 364Assert.Same(grandparent, control.ContainingControl); 375Assert.Same(parent, control.ContainingControl); 378Assert.Same(parent, control.ContainingControl); 382Assert.Same(parent, control.ContainingControl); 393Assert.Null(control.ContainingControl); 396Assert.Null(control.ContainingControl); 401Assert.Same(grandparent, control.ContainingControl); 404Assert.Same(grandparent, control.ContainingControl); 408Assert.Same(grandparent, control.ContainingControl); 425Assert.Same(value, control.ContainingControl); 429Assert.Same(value, control.ContainingControl);