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)
410ContainerControl? containingControl = ContainingControl; 420ContainerControl? containingControl = ContainingControl; 924ContainerControl? containingControl = ContainingControl; 1388if (!Visible && ContainingControl is not null && ContainingControl.Visible) 1470ContainerControl? containingControl = ContainingControl; 1599ContainerControl? container = ContainingControl; 1760hwnd = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 1937/// The <see cref="ContainingControl"/> property value can be different from the <see cref="Control.Parent"/> 1938/// property. The <see cref="ContainingControl"/> represented by this property is the ActiveX control's 1940/// the <see cref="GroupBox"/> is contained on a <see cref="Form"/>, then the <see cref="ContainingControl"/> 1986private bool ShouldSerializeContainingControl() => ContainingControl != ParentInternal; 2971hWndOwner = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 3026HWND handle = ContainingControl is null ? HWND.Null : ContainingControl.HWND; 3429if (ContainingControl is { } container) 3496if (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);