2 writes to ContainingControl
System.Windows.Forms.Tests (2)
System\Windows\Forms\AxHostTests.cs (2)
425ContainingControl = value 430control.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)
54Assert.Null(control.ContainingControl); 148Assert.Null(control.ContainingControl); 359Assert.Same(grandparent, control.ContainingControl); 362Assert.Same(control.ContainingControl, control.ContainingControl); 366Assert.Same(grandparent, control.ContainingControl); 377Assert.Same(parent, control.ContainingControl); 380Assert.Same(parent, control.ContainingControl); 384Assert.Same(parent, control.ContainingControl); 395Assert.Null(control.ContainingControl); 398Assert.Null(control.ContainingControl); 403Assert.Same(grandparent, control.ContainingControl); 406Assert.Same(grandparent, control.ContainingControl); 410Assert.Same(grandparent, control.ContainingControl); 427Assert.Same(value, control.ContainingControl); 431Assert.Same(value, control.ContainingControl);