206 references to Owner
System.Windows.Forms (108)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (1)
553Owner?.ToolStripControlHost?.Owner?.AccessibilityObject;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (4)
2128if (this is ToolStripDropDown dropDown && dropDown.OwnerItem is not null && (dropDown.OwnerItem.IsInDesignMode || (dropDown.OwnerItem.Owner is not null && dropDown.OwnerItem.Owner.IsInDesignMode))) 3501if (!IsDropDown && item.Owner == this) 4065if (item.Owner != this)
System\Windows\Forms\Controls\ToolStrips\ToolStripButton.cs (1)
202if (Owner is null)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxControlAccessibleObject.cs (1)
39? owner.Owner?.Owner?.AccessibilityObject
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
685if (oldParent is not null && Owner is null && newParent is null && _control is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.ToolStripHostedControlAccessibleObject.cs (2)
35&& _toolStripControlHost.Owner is not null 36? _toolStripControlHost.Owner.AccessibilityObject
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (5)
305_ownerItem?.Owner is not null ? _ownerItem.Owner.DropDownOwnerWindow : base.DropDownOwnerWindow; 648if (_ownerItem.Placement == ToolStripItemPlacement.Overflow && _ownerItem.Owner is not null) 650return _ownerItem.Owner.OverflowButton.DropDown; 655return _ownerItem.Owner;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
179if (Owner is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (2)
66_owner.Owner is ToolStripDropDown toolStripDropDown 180if (_owner.Owner is not ToolStripDropDown dropDown)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (51)
664if (Owner is not null and StatusStrip) 806if (Owner is not null) 808parentEnabled = Owner.Enabled; 971IArrangedElement? IArrangedElement.Container => ParentInternal ?? Owner; 1031if (image is null && Owner?.ImageList is not null && ImageIndexer.ActualIndex >= 0) 1034if (!disposing && ImageIndexer.ActualIndex < Owner.ImageList.Images.Count) 1037image = Owner.ImageList.Images[ImageIndexer.ActualIndex]; 1122if ((Owner is not null) && ImageIndexer.Index != ImageList.Indexer.DefaultIndex 1123&& Owner.ImageList is not null && ImageIndexer.Index >= Owner.ImageList.Images.Count) 1125return Owner.ImageList.Images.Count - 1; 1234else if (Owner is not null && Owner.IsDropDown) 1439else if (Owner is not null) 1442currentParent = Owner as ToolStripDropDown; 1503if (Owner is not null) 1505LayoutTransaction.DoLayout(Owner, Owner, "Overflow"); 1562bool usingImageList = ((Owner is not null) && (Owner.ImageList is not null) && (ImageIndexer.ActualIndex >= 0)); 1566ToolStrip? ownerToolStrip = Owner; 1574? Owner?.ImageList?.ImageSize ?? Size.Empty 1623if (Owner is not null) 1625return Owner.Renderer; 1651if (Owner is not null) 1653rightToLeft = Owner.RightToLeft; 1920textDirection = (Owner is null) ? ToolStripTextDirection.Horizontal : Owner.TextDirection; 2096if (Owner is not null) 2099Debug.Assert(Owner.Items.Contains(this), "How can there be a owner and not be in the collection?"); 2100Owner.Items.Remove(this); 2325private Font? GetOwnerFont() => Owner?.Font; 2340return Owner as ToolStripDropDown; 2385if (Owner is not null) 2387LayoutTransaction.DoLayout(Owner, this, affectedProperty); 2392Owner?.Invalidate(); 2425if (SupportsItemClick && Owner is not null) 2427Owner.HandleItemClick(this); 2432if (SupportsItemClick && Owner is not null) 2434Owner.HandleItemClicked(this); 2959if (Owner is not null) 3008if (Owner is not null && !(Owner.IsDisposed || Owner.Disposing)) 3010Owner.OnItemVisibleChanged(new ToolStripItemEventArgs(this), performLayout: true); 3058Owner?.UpdateToolTip(this, true); 3134if (Owner is not null && Owner.IsCurrentlyDragging) 3427parent ??= (IsOnOverflow && Owner is not null) ? Owner.OverflowButton.DropDown : Owner;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemImageIndexer.cs (1)
20get => _item.Owner?.ImageList;
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (1)
512item.Owner?.Items.Remove(item);
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (1)
331if (Owner is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (3)
1190PreviousIndexCollection = source.Owner!.Items 1210PreviousIndexCollection = source.Owner!.Items 1225PreviousIndexCollection = source.Owner!.Items
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (8)
375ToolStrip? owner = Owner; 922if (Owner is not null) 924if (Owner.Shortcuts.ContainsKey(shortcut)) 927Owner.Shortcuts[shortcut] = this; 931Owner.Shortcuts.Add(shortcut, this); 934_lastOwner = Owner; 943if (Owner is null) 1070if (Owner is ToolStripDropDownMenu dropDownMenu)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (8)
25if (_ownerItem.Owner is ToolStripDropDownMenu menu) 38if (_ownerItem.Owner is ToolStripDropDownMenu menu) 69if (_ownerItem.Owner is ToolStripDropDownMenu menu) 89if (_ownerItem.Owner is ToolStripDropDownMenu menu) 113if (_ownerItem.Owner is ToolStripDropDownMenu menu) 145if (_ownerItem.Owner is ToolStripDropDownMenu menu) 159return _ownerItem.Owner is ToolStripDropDownMenu; 167if (_ownerItem.Owner is ToolStripDropDownMenu menu)
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (6)
603else if (item.Owner is not null && item.BackColor != item.Owner.BackColor) 654else if (item.Owner is not null && item.BackColor != item.Owner.BackColor) 1586else if (item.Owner is not null && item.BackColor != item.Owner.BackColor)
System\Windows\Forms\Controls\ToolStrips\ToolStripProgressBar.cs (1)
87if (Owner is not null and StatusStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripProgressBar.ToolStripProgressBarControlAccessibleObject.cs (1)
21_ownerToolStripProgressBarControl.Owner?.Owner?.AccessibilityObject;
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.StickyLabelAccessibleObject.cs (1)
43_owner.OwnerScrollButton?.Owner?.AccessibilityObject;
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (4)
171ToolStrip? parent = ParentInternal ?? Owner; 259ToolStrip? parent = ParentInternal ?? Owner; 290if (Owner is not null && ParentInternal is not null) 308if (Owner is ToolStripDropDownMenu dropDownMenu)
System\Windows\Forms\Controls\ToolStrips\ToolStripStatusLabel.cs (2)
119LayoutTransaction.DoLayout(Owner, this, PropertyNames.BorderStyle); 194if (Owner is not null)
System\Windows\Forms\MDI\MdiWindowListItemConverter.cs (1)
26if (values[i] is ToolStripItem currentItem && currentItem.Owner == menu)
System\Windows\Forms\MDI\MdiWindowListStrip.cs (1)
38if (_mergeItem.Owner is null)
System.Windows.Forms.Design (98)
System\ComponentModel\Design\DesignerActionUI.cs (1)
674if (item.Owner is not null)
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
33get => _currentItem.Owner;
System\Windows\Forms\Design\ToolStripCollectionEditor.cs (1)
50primarySelection = toolStripDropDownItem.Owner;
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (1)
282parent ??= item.Owner;
System\Windows\Forms\Design\ToolStripDesigner.cs (13)
709if (item.Placement == ToolStripItemPlacement.Overflow && item.Owner == ToolStrip) 728if (item.Owner == ToolStrip) 743if (topMostItem is not null && topMostItem.Owner == ToolStrip) 752ToolStripItem parentItem = ((ToolStripDropDown)(item.Owner)).OwnerItem; 757if (topMostItem is not null && topMostItem.Owner == ToolStrip) 883if (selectedItem.Owner == ToolStrip) 946if (selectedItem is ToolStripItem currentSel && currentSel.Owner != ToolStrip) 954if (addingItem is not null && addingItem.Owner is not null) 956if (addingItem.Owner.Site is null) 982ToolStrip parent = changingItem.Owner; 1004if (e.Component is ToolStripItem item && item.Owner == Component) 1075if (e.Component is ToolStripItem item && item.Owner == Component) 1635ToolStripDropDown topmost = item.Owner as ToolStripDropDown;
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (1)
94parent = stripItem.Owner;
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
448parent = item.Owner as ToolStripDropDown;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (7)
398parent = glyphItem.Owner; 436bSvc?.Invalidate(glyphItem.Owner.Bounds); 558if (glyphItem.Owner is ToolStripDropDown parentDropDown) 597ToolStrip owner = selectedItem.Owner; 724parentToolStrip = overflow.OwnerItem.Owner; 837if (data.Owner == glyphItem.Owner) 991if (glyphItem.Owner is ToolStripDropDown parentDropDown)
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (4)
60get => _currentItem.Owner; 348InsertIntoDropDown((ToolStripDropDown)_currentItem.Owner, t); 407if ((parent is not null) && (parent.OwnerItem is not null) && (parent.OwnerItem.Owner is not null)) 409if (designerHost.GetDesigner(parent.OwnerItem.Owner) is ToolStripDesigner toolStripDesigner)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (21)
160return parent ?? ToolStripItem.Owner; 175ToolStrip strip = ToolStripItem.Owner; 268parentControls.Add(item.Owner); 269startComp = item.Owner; 273if (item.Owner is ToolStripDropDown parentDropDown) 286if (item.Owner.Site is not null) 288parentControls.Add(item.Owner); 291startComp = item.Owner; 334ToolStripDesigner designer = (ToolStripDesigner)designerHost.GetDesigner(ToolStripItem.Owner); 489protected virtual Component GetOwnerForActionList() => (ToolStripItem.Placement == ToolStripItemPlacement.Main) ? ToolStripItem.GetCurrentParent() : ToolStripItem.Owner; 491internal virtual ToolStrip GetMainToolStrip() => ToolStripItem.Owner; 567parent ??= ToolStripItem.Owner; 592if (currentItem.Owner is ToolStripDropDown) 594ToolStripDropDown topmost = currentItem.Owner as ToolStripDropDown; 596while (topmost.OwnerItem is not null && (topmost.OwnerItem.Owner is ToolStripDropDown)) 598topmost = topmost.OwnerItem.Owner as ToolStripDropDown; 707parent = ToolStripItem.Owner; 964if (TryGetService(out IDesignerHost designerHost) && currentSelection.Owner is ToolStripDropDown parentDropDown) 994else if (currentSelection.Owner is not null) 1000behaviorService.Invalidate(behaviorService.ControlRectInAdornerWindow(currentSelection.Owner)); 1099parent = ToolStripItem.Owner;
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (19)
768parent = selectedItem.Owner; 847ToolStripDropDownItem ownerItem = (ToolStripDropDownItem)((ToolStripDropDown)(typeHereNode.Owner)).OwnerItem; 859if (host.GetDesigner(typeHereNode.Owner) is ToolStripDesigner tooldesigner) 933ToolStripDropDownItem ownerItem = (ToolStripDropDownItem)((ToolStripDropDown)(typeHereNode.Owner)).OwnerItem; 944if (host.GetDesigner(typeHereNode.Owner) is ToolStripDesigner tooldesigner) 1260ToolStripItem owner = ((ToolStripDropDown)item.Owner).OwnerItem; 1365? dropDownItem.Owner.OverflowButton.DropDown 1366: dropDownItem.Owner) as ToolStripDropDown; 1390&& parentToMoveOn.OwnerItem.Owner?.Site is not null 1414if (item.Owner is ToolStrip owner) 1432&& parentToMoveOn.OwnerItem.Owner?.Site is not null 1686next = toolStripItem.Owner.Controls[0]; 1703next = ((ToolStripDropDown)toolStripItem.Owner).OwnerItem; 1707ToolStrip owner = toolStripItem.Owner; 1710next = toolStripItem.Owner; 1714next = toolStripItem.Owner; 1768ctl = templateNodeItem.Owner; 1829ToolStripItem parentItem = ((ToolStripDropDown)designerItem.Owner).OwnerItem; 1848if (item.Owner is ToolStrip owner)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (28)
292if (toolItem.IsOnDropDown && toolItem.Owner is ToolStripDropDown dropDown) 333if (MenuItem.Owner is ToolStripDropDown dropDown) 428if (!(MenuItem.Owner is ToolStripDropDown) && base.Editor is not null) // we are on Base MenuStrip !! 911if (lastSelected.Owner is ToolStripDropDown lastDropDown && currentSelected.Owner is ToolStripDropDown currentDropDown) 945while (currentItem?.Owner is ToolStripDropDown dropDown) 1228selectedItem = ((ToolStripDropDown)item.Owner).OwnerItem as ToolStripDropDownItem; 1288if (MenuItem.Owner is ToolStripDropDown dropDown) 1340if (!(dropDownItem.Owner is ToolStripDropDownMenu) && dropDownItem is not null && dropDownItem.Bounds.Width < _commitedEditorNode.Bounds.Width) 1382return topMostItem.Owner; 1385return MenuItem.Owner; 1395if (MenuItem.Owner is ToolStripDropDown dropDown) 1405if (item.Owner is ToolStripDropDown itemDropDown) 1432if (item.Owner is ToolStripDropDown dropDown) 1581GetService<BehaviorService>()?.Invalidate(MenuItem.Owner.Bounds); 1589ToolStripDropDown startDropDown = MenuItem.Owner as ToolStripDropDown; 1594startDropDown = ownerItem.Owner as ToolStripDropDown; 1829if (e.Component is ToolStripItem itemAdding && itemAdding.Owner is null) 1846if (itemToBeDeleted.Owner is ToolStripDropDown owner) 1926if (itemToBeDeleted.Owner is ToolStripDropDown owner) 2118if (IsOnContextMenu && !MenuItem.Owner.Visible) 2168ToolStripDropDown parent = currentSelection.Owner as ToolStripDropDown; 2177parent = parent.OwnerItem.Owner as ToolStripDropDown; 2196ToolStripDropDown parent = item.Owner as ToolStripDropDown; 2205parent = parent.OwnerItem.Owner as ToolStripDropDown; 2446if (MenuItem.Owner is ToolStripDropDown dropDown) 2485ToolStripDropDown ownerDropDown = (ToolStripDropDown)MenuItem.Owner; 2507while (currentSelection is not null && currentSelection.Owner is ToolStripDropDown dropDown)