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