6 types derived from ToolStrip
System.Windows.Forms (5)
System\Windows\Forms\Controls\Menus\MenuStrip.cs (1)
11public partial class MenuStrip : ToolStrip
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStrip.cs (1)
10internal partial class PropertyGridToolStrip : ToolStrip
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
12public partial class StatusStrip : ToolStrip
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
12public partial class ToolStripDropDown : ToolStrip
System\Windows\Forms\DataBinding\BindingNavigator.cs (1)
14public class BindingNavigator : ToolStrip, ISupportInitialize
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
1580public class TransparentToolStrip : ToolStrip
1 instantiation of ToolStrip
System.Windows.Forms (1)
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
759_toolStrip1 = new ToolStrip();
392 references to ToolStrip
System.Windows.Forms (261)
src\winforms\src\Common\src\Obsoletions.cs (1)
39internal const string ToolBarMessage = $"`{nameof(ToolBar)}` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `{nameof(ToolStrip)}` instead.";
System\Windows\Forms\Control.cs (1)
10009if (ctl._parent is ToolStrip)
System\Windows\Forms\Controls\Menus\MenuTimer.cs (1)
133internal void HandleToolStripMouseLeave(ToolStrip toolStrip)
System\Windows\Forms\Controls\ToolStrips\MergeHistory.cs (2)
10public MergeHistory(ToolStrip mergedToolStrip) 18public ToolStrip MergedToolStrip { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (11)
2263ToolStrip toolStrip = (ToolStrip)container; 2327ToolStrip toolStrip = (ToolStrip)container; 2416internal virtual ToolStrip? GetToplevelOwnerToolStrip() 4076protected static void SetItemParent(ToolStripItem item, ToolStrip parent) 4443internal void SnapFocusChange(ToolStrip otherToolStrip) 4587if (previousControl is ToolStrip || previousControl?.Parent is ToolStrip) 4600&& nextControl is not ToolStrip 4601&& nextControl?.Parent is not ToolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.RestoreFocusMessageFilter.cs (2)
10private readonly ToolStrip _ownerToolStrip; 12public RestoreFocusMessageFilter(ToolStrip ownerToolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (11)
12public ToolStripAccessibleObject(ToolStrip owner) : base(owner) 17=> this.IsOwnerHandleCreated(out ToolStrip? _) ? HitTest((int)x, (int)y) : null; 24if (!this.IsOwnerHandleCreated(out ToolStrip? owner)) 42if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.Items is null) 122if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.Items is null) 151if (!this.TryGetOwnerAs(out ToolStrip? owner) || fragmentIndex < 0) 260if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.OverflowItems is null) 270if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.DisplayedItems is null) 280if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.Items is null) 325if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.Items is null) 383if (!this.IsOwnerHandleCreated(out ToolStrip? _))
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (4)
683protected override void OnParentChanged(ToolStrip? oldParent, ToolStrip? newParent) 690= GetControlCollection(_control.ParentInternal as ToolStrip); 796private static ReadOnlyControlCollection? GetControlCollection(ToolStrip? toolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripCustomIComparer.cs (3)
6internal class ToolStripCustomIComparer : IComparer<ToolStrip> 8public int Compare(ToolStrip? x, ToolStrip? y)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (10)
635internal ToolStrip? OwnerToolStrip 641ToolStrip? owner = _ownerItem.ParentInternal; 911ToolStrip? toplevelOwnerToolStrip = GetToplevelOwnerToolStrip(); 1054internal override ToolStrip? GetToplevelOwnerToolStrip() 1309ToolStrip? toplevelToolStrip = GetToplevelOwnerToolStrip(); 1359ToolStrip? toplevel = GetToplevelOwnerToolStrip(); 1665ToolStrip? topLevelToolStrip = GetToplevelOwnerToolStrip(); 1666ToolStrip? parentToolStrip = OwnerItem?.ParentInternal; 1753ToolStrip? toolStrip = GetToplevelOwnerToolStrip(); 2027internal static ToolStripDropDown? GetFirstDropDown(ToolStrip start)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
127ToolStrip? parent = ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (1)
166if (_owner.DropDown.AccessibilityObject is ToolStrip.ToolStripAccessibleObject toolStripAccessibleObject)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (4)
17private readonly ToolStrip _owner; 19public ToolStrip Owner => _owner; 21public ToolStripDropTargetManager(ToolStrip owner) 224if (dragEnterArgs.DropImageType > DropImageType.Invalid && _owner is ToolStrip toolStrip && toolStrip.IsHandleCreated)
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (2)
14private Point _lastEndLocation = ToolStrip.s_invalidMouseEnter; 49_lastEndLocation = ToolStrip.s_invalidMouseEnter;
System\Windows\Forms\Controls\ToolStrips\ToolStripGripRenderEventArgs.cs (1)
13public ToolStripGripRenderEventArgs(Graphics g, ToolStrip toolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (1)
58ToolStrip toolStrip = e.ToolStrip;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (16)
32private ToolStrip? _parent; 33private ToolStrip? _owner; 1207ToolStrip? parent = ParentInternal; 1410public ToolStrip? Owner 1480protected internal ToolStrip? Parent 1532internal ToolStrip? ParentInternal 1539ToolStrip? oldParent = _parent; 1566ToolStrip? ownerToolStrip = Owner; 1617/// Returns the parent <see cref="ToolStrip"/>'s renderer 2331public ToolStrip? GetCurrentParent() => Parent; 2669ToolStrip? parent = ParentInternal; 2898protected virtual void OnParentChanged(ToolStrip? oldParent, ToolStrip? newParent) 3187internal void SetOwner(ToolStrip? newOwner) 3425ToolStrip? parent = ParentInternal; 3499internal ToolStrip? RootToolStrip
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (9)
93/// For <see cref="ToolStrip" /> hash code is unique even with child controls. 235ToolStrip? parent = Owner.ParentInternal; 363if (Parent is ToolStrip.ToolStripAccessibleObject toolStripParent) 373if (toolStripOverflowButtonParent.Parent is ToolStrip.ToolStripAccessibleObject toolStripGrandParent) 389if (Parent is ToolStrip.ToolStripAccessibleObject toolStripParent) 396if (toolStripOverflowButtonParent.Parent is ToolStrip.ToolStripAccessibleObject toolStripGrandParent) 412if (Parent is ToolStrip.ToolStripAccessibleObject toolStripParent) 419if (toolStripOverflowButtonParent.Parent is ToolStrip.ToolStripAccessibleObject toolStripGrandParent) 447ToolStrip? root = _ownerItem.RootToolStrip;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (2)
54protected virtual ToolStrip? ParentInternal => _ownerItem?.ParentInternal; 183ToolStrip? parent = ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.ToolStripLayoutData.cs (2)
18public ToolStripLayoutData(ToolStrip toolStrip) 25public bool IsCurrent(ToolStrip? toolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (5)
16private readonly ToolStrip? _owner; 24internal ToolStripItemCollection(ToolStrip? owner, bool itemsCollection) 29internal ToolStripItemCollection(ToolStrip? owner, bool itemsCollection, bool isReadOnly) 36public ToolStripItemCollection(ToolStrip owner, ToolStripItem[] value) 389ToolStrip? parent = item.ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripItemRenderEventArgs.cs (1)
32public ToolStrip? ToolStrip => Item.ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (2)
256ToolStrip? parent = Parent; 271ToolStrip? parent = Parent;
System\Windows\Forms\Controls\ToolStrips\ToolStripLocationCancelEventHandler.cs (2)
8/// <see cref="ToolStrip.OnLocationChanging"/> event for <see cref="ToolStrip"/>.
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (35)
15private static WeakRefCollection<ToolStrip>? t_activeToolStrips; 132internal static WeakRefCollection<ToolStrip> ToolStrips 148public static ToolStrip? FindToolStrip(string toolStripName) 150foreach (ToolStrip toolStrip in ToolStrips) 164internal static ToolStrip? FindToolStrip(Form owningForm, string toolStripName) 166ToolStrip? result = null; 167foreach (ToolStrip toolStrip in ToolStrips) 182private static bool CanChangeSelection(ToolStrip start, ToolStrip toolStrip) 211private static bool ChangeSelection(ToolStrip start, ToolStrip toolStrip) 294foreach (ToolStrip toolStrip in ToolStrips) 321internal static bool SelectNextToolStrip(ToolStrip start, bool forward) 329ToolStrip? wrappedControl = null; 330ToolStrip? nextControl = null; 340if (ToolStrips[index] is not ToolStrip toolStrip || 701foreach (ToolStrip toolStrip in ToolStrips) 780foreach (ToolStrip toolStrip in ToolStrips) 828ToolStrip? topMostToolStrip = toolStrip.GetToplevelOwnerToolStrip(); 1043internal static List<ToolStrip> FindMergeableToolStrips(ContainerControl? container) 1045List<ToolStrip> result = []; 1048foreach (ToolStrip toolStrip in ToolStrips) 1062private static bool IsSpecialMDIStrip(ToolStrip toolStrip) 1068public static bool Merge(ToolStrip sourceToolStrip, ToolStrip targetToolStrip) 1240public static bool Merge(ToolStrip sourceToolStrip, string targetName) 1245ToolStrip? target = FindToolStrip(targetName); 1252internal static bool RevertMergeInternal(ToolStrip targetToolStrip, ToolStrip? sourceToolStrip, bool revertMDIControls) 1288Stack<ToolStrip> reApply = new(); 1333ToolStrip mergeAgain = reApply.Pop(); 1349public static bool RevertMerge(ToolStrip targetToolStrip) 1355public static bool RevertMerge(ToolStrip targetToolStrip, ToolStrip sourceToolStrip) 1362=> FindToolStrip(targetName) is ToolStrip target && RevertMerge(target);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (16)
34private List<ToolStrip>? _inputFilterQueue; 44private ToolStrip? _toplevelToolStrip; 220internal static ToolStrip? GetActiveToolStrip() => Instance.GetActiveToolStripInternal(); 222internal ToolStrip? GetActiveToolStripInternal() 235private ToolStrip? GetCurrentTopLevelToolStrip() 239ToolStrip? activeToolStrip = GetActiveToolStripInternal(); 258if (Control.FromHandle(m.HWnd) is ToolStrip toolStrip && !toolStrip.IsDropDown) 317ToolStrip? activeToolStrip = GetActiveToolStripInternal(); 374internal static void SetActiveToolStrip(ToolStrip toolStrip, bool menuKeyPressed) 384internal static void SetActiveToolStrip(ToolStrip toolStrip) 387private void SetActiveToolStripCore(ToolStrip toolStrip) 422ToolStrip? currentActiveToolStrip = GetActiveToolStripInternal(); 475internal static void RemoveActiveToolStrip(ToolStrip toolStrip) 480private void RemoveActiveToolStripCore(ToolStrip toolStrip) 515ToolStrip? activeToolStrip = GetActiveToolStrip(); 575ToolStrip? toplevelToolStrip = GetCurrentTopLevelToolStrip();
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
30private ToolStrip? _lastOwner; 375ToolStrip? owner = Owner;
System\Windows\Forms\Controls\ToolStrips\ToolStripNumericUpDown.ToolStripNumericUpDownControl.cs (1)
10public ToolStrip? ParentToolStrip { get; private set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
42private ToolStrip? ParentToolStrip
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (3)
14private readonly ToolStrip _parentToolStrip; 19internal ToolStripOverflowButton(ToolStrip parentToolStrip) 49internal ToolStrip ParentToolStrip => _parentToolStrip;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (16)
416private Point GetStartLocation(ToolStrip toolStripToDrag) 456var toolStrip = e.Control as ToolStrip; 538var toolStrip = controls[i] as ToolStrip; 643var toolStrip = controlArray[i] as ToolStrip; 666private void GiveToolStripPanelFeedback(ToolStrip toolStripToDrag, Point screenLocation) 709public void Join(ToolStrip toolStripToDrag) 714public void Join(ToolStrip toolStripToDrag, int row) 741public void Join(ToolStrip toolStripToDrag, int x, int y) 746public void Join(ToolStrip toolStripToDrag, Point location) 770internal void MoveControl(ToolStrip? toolStripToDrag, Point screenLocation) 790private void MoveInsideContainer(ToolStrip toolStripToDrag, Point clientLocation) 983private void MoveOutsideContainer(ToolStrip toolStripToDrag, Point screenLocation) 996ToolStrip draggedControl = toolStripToDrag;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.cs (1)
15: base(owner, typeof(ToolStrip))
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (3)
18private ToolStrip _wrappedToolStrip; 50if (control is not ToolStrip toolStrip) 52throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfType, nameof(ToolStrip))), control.GetType().Name);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (7)
265public bool CanMove(ToolStrip toolStripToDrag) 339internal Size GetMinimumSize(ToolStrip toolStrip) 460Size minSize = GetMinimumSize((ToolStrip)currentCell.Control); 557Size minSize = GetMinimumSize((ToolStrip)currentCell.Control); 703internal void MoveControl(ToolStrip movingControl, Point startClientLocation, Point endClientLocation) 708internal void JoinRow(ToolStrip toolStripToDrag, Point locationToDrag) 713internal void LeaveRow(ToolStrip toolStripToDrag)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (5)
80public override bool CanMove(ToolStrip toolStripToDrag) 88totalSize += Row.GetMinimumSize((ToolStrip)Row.ControlsInternal[i]); 139public override void MoveControl(ToolStrip movingControl, Point clientStartLocation, Point clientEndLocation) 350public override void LeaveRow(ToolStrip toolStripToDrag) 391public override void JoinRow(ToolStrip toolStripToDrag, Point locationToDrag)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (2)
78throw new NotSupportedException(string.Format(SR.TypedControlCollectionShouldBeOfType, nameof(ToolStrip))); 210throw new NotSupportedException(string.Format(SR.TypedControlCollectionShouldBeOfType, nameof(ToolStrip)));
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowManager.cs (4)
19public virtual bool CanMove(ToolStrip toolStripToDrag) 171public virtual void MoveControl(ToolStrip movingControl, Point startClientLocation, Point endClientLocation) 176public virtual void LeaveRow(ToolStrip toolStripToDrag) 180public virtual void JoinRow(ToolStrip toolStripToDrag, Point locationToDrag)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (5)
82public override bool CanMove(ToolStrip toolStripToDrag) 90totalSize += Row.GetMinimumSize((ToolStrip)Row.ControlsInternal[i]); 141public override void MoveControl(ToolStrip movingControl, Point clientStartLocation, Point clientEndLocation) 398public override void JoinRow(ToolStrip toolStripToDrag, Point locationToDrag) 560public override void LeaveRow(ToolStrip toolStripToDrag)
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (7)
118ToolStrip toolStrip = e.ToolStrip; 400ToolStrip toolStrip = e.ToolStrip; 483ToolStrip toolStrip = e.ToolStrip; 833internal override Region? GetTransparentRegion(ToolStrip toolStrip) 902ToolStrip toolStrip = e.ToolStrip; 1172ToolStrip toolStrip = e.ToolStrip; 1338ToolStrip toolStrip = e.ToolStrip;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
565internal virtual Region? GetTransparentRegion(ToolStrip toolStrip) => null; 567protected internal virtual void Initialize(ToolStrip toolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (3)
15public ToolStripRenderEventArgs(Graphics g, ToolStrip toolStrip) 25ToolStrip toolStrip, 48public ToolStrip ToolStrip { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (2)
171ToolStrip? parent = ParentInternal ?? Owner; 259ToolStrip? parent = ParentInternal ?? Owner;
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (16)
28List<ToolStrip> toolStripControls = []; 31foreach (ToolStrip toolStrip in toolStripControls) 50List<ToolStrip> toolStripControls = []; 53foreach (ToolStrip toolStrip in toolStripControls) 72internal static string GetItemOrder(ToolStrip toolStrip) 101Dictionary<string, ToolStrip> itemLocationHash = BuildItemOriginationHash(); 116ToolStrip? toolStrip = ToolStripManager.FindToolStrip(_form, toolStripSettings.Name); 161ToolStrip? toolStrip = ToolStripManager.FindToolStrip(_form, settings.Name); 174private static void ApplyToolStripSettings(ToolStrip? toolStrip, SettingsStub settings, Dictionary<string, ToolStrip> itemLocationHash) 198if (!string.IsNullOrEmpty(key) && itemLocationHash.TryGetValue(key, out ToolStrip? value)) 210private Dictionary<string, ToolStrip> BuildItemOriginationHash() 212Dictionary<string, ToolStrip> itemLocationHash = []; 214List<ToolStrip> toolStripControls = []; 217foreach (ToolStrip toolStrip in toolStripControls) 275private string GetSettingsKey(ToolStrip toolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.SettingsStub.cs (1)
22public SettingsStub(ToolStrip toolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonButtonLayout.cs (1)
30protected override ToolStrip? ParentInternal
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (7)
14private readonly ToolStrip _owner; 16public ToolStripSplitStackDragDropHandler(ToolStrip owner) 143insertionRect = new Rectangle(_owner.Margin.Left, item.Bounds.Top, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth); 146insertionRect = new Rectangle(_owner.Margin.Left, item.Bounds.Bottom, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth); 149insertionRect = new Rectangle(item.Bounds.Right, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1); 152insertionRect = new Rectangle(item.Bounds.Left, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1); 162insertionRect.Width = ToolStrip.s_insertionBeamWidth;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (14)
14internal ToolStripSplitStackLayout(ToolStrip owner) 33ToolStrip toolStrip = ToolStrip; 52public ToolStrip ToolStrip { get; } 61ToolStrip toolStrip = ToolStrip; 111ToolStrip toolStrip = ToolStrip; 156if (!(container is ToolStrip)) 163return ToolStrip.GetPreferredSizeHorizontal(container, proposedConstraints); 167return ToolStrip.GetPreferredSizeVertical(container); 182if (!(container is ToolStrip)) 210ToolStrip toolStrip = ToolStrip; 356ToolStrip toolStrip = ToolStrip; 372toolStripPreferredSize = ToolStrip.GetPreferredSizeVertical(toolStrip) - toolStrip.Padding.Size; 522ToolStrip toolStrip = ToolStrip; 545ToolStrip toolStrip = ToolStrip;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (4)
90private static bool ShouldPaintBackground(ToolStrip toolStrip) 119ToolStrip toolStrip = e.ToolStrip; 173ToolStrip toolStrip = e.ToolStrip; 524ToolStrip toolStrip = e.ToolStrip;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (3)
231ToolStrip toolStrip = e.ToolStrip; 289ToolStrip toolStrip = e.ToolStrip; 738ToolStrip? parent = item.GetCurrentParent();
System\Windows\Forms\Form.cs (3)
6269ToolStrip? thisToolstrip = MainMenuStrip; 6270List<ToolStrip> childrenToolStrips = ToolStripManager.FindMergeableToolStrips(ActiveMdiChildInternal); 6285foreach (ToolStrip sourceToolStrip in childrenToolStrips)
System\Windows\Forms\OLE\DropTarget.cs (1)
30&& toolStripTargetManager?.Owner is ToolStrip toolStrip
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
22private ToolStrip _toolStrip1;
System.Windows.Forms.Design (131)
System\ComponentModel\Design\ToolStripContainerActionList.cs (1)
166newParent = control is ToolStrip ? GetParent(control) : _toolStripContainer.ContentPanel;
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (6)
35if (component is ToolStrip) 145if (controls[0] is not ToolStrip control) 158control = (ToolStrip)temp[0]; 195if (controls.Count == 1 && control is ToolStrip) 230if (dragComponent is ToolStrip tool && tool.Parent != _relatedControl) 270if (item.GetType(host) == typeof(ToolStrip)
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (3)
46ToolStrip toolStrip = _designer.Component as ToolStrip; 117private static Control GetParent(ToolStripContainer container, ToolStrip c)
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (3)
35internal GlyphCollection GetGlyphs(ToolStrip parent, GlyphCollection glyphs, Behavior.Behavior standardBehavior) 66if (Control is ToolStrip miniToolStrip) 78if (Control is ToolStrip miniToolStrip)
System\Windows\Forms\Design\DocumentDesigner.cs (1)
898&& ce.Component is not ToolStrip
System\Windows\Forms\Design\FormDocumentDesigner.cs (2)
363if (ce.Component is ToolStrip && _toolStripAdornerWindowService is null && TryGetService(out IDesignerHost _)) 375if (ce.Component is ToolStrip && _toolStripAdornerWindowService is not null)
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
54CreateStandardToolStrip(_host, (ToolStrip)_designer.Component); 253private void CreateStandardToolStrip(IDesignerHost host, ToolStrip tool)
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (2)
31private ToolStrip ParentTool 67ToolStrip parent = ParentTool;
System\Windows\Forms\Design\ToolStripActionList.cs (2)
11private readonly ToolStrip _toolStrip; 20_toolStrip = (ToolStrip)designer.Component;
System\Windows\Forms\Design\ToolStripCodeDomSerializer.cs (1)
12if (parent is not ToolStrip toolStrip)
System\Windows\Forms\Design\ToolStripCollectionEditor.cs (1)
54if (primarySelection is ToolStrip)
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (12)
136ToolStrip realToolStrip = ToolStripFromObject(Context.Instance); 392ToolStrip ownerToolStrip = Context is { Instance: not null } contextInstance 808if (selectedItems.Length == 1 && selectedItems[0] is ToolStrip toolStrip) 810ToolStrip parentStrip = toolStrip; 836if (obj is ToolStrip) 881selectedItem = _listBoxItems.SelectedItem is ToolStrip strip ? strip : (ToolStripItem)_listBoxItems.SelectedItem; 955internal static ToolStrip ToolStripFromObject(object instance) 957ToolStrip currentToolStrip = null; 961currentToolStrip = instance is ToolStripDropDownItem toolStripDropDownItem ? toolStripDropDownItem.DropDown : instance as ToolStrip; 1230public ToolStrip _host; 1234if (componentItem is ToolStrip toolStrip) 1252public ToolStrip Host => _host;
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (2)
176else if (typeof(ToolStrip).IsAssignableFrom(toolType)) 349else if (typeof(ToolStrip).IsAssignableFrom(toolType))
System\Windows\Forms\Design\ToolStripCustomTypeDescriptor.cs (2)
10private readonly ToolStrip _instance; 14public ToolStripCustomTypeDescriptor(ToolStrip instance) : base()
System\Windows\Forms\Design\ToolStripDesigner.cs (12)
32private ToolStrip _miniToolStrip; // the toolStrip that hosts the "New Template Node" button 275internal ToolStrip EditorToolStrip 384protected ToolStrip ToolStrip => (ToolStrip)Component; 857if (_toolStripSelected && e.Component is ToolStrip) 982ToolStrip parent = changingItem.Owner; 1333if (comp is ToolStrip) 1559if (c is ToolStrip && (c != ToolStrip)) 1583if (c is ToolStrip && menu is null) 1795if (selComp is ToolStrip) 1823ToolStrip parentToolStrip = ToolStrip; 2194if (sender is ToolStrip tool && !tool.Visible)
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (6)
87private static ToolStrip GetToolStripFromComponent(IComponent component) 89ToolStrip parent; 103parent = component as ToolStrip; 193ToolStrip toolStrip = GetToolStripFromComponent(component); 212private static ToolStripItemDesignerAvailability GetDesignerVisibility(ToolStrip toolStrip) 252ToolStrip toolStrip = GetToolStripFromComponent(component);
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
80get => ((ToolStrip)Component).Items;
System\Windows\Forms\Design\ToolStripInSituService.cs (1)
223if (comp is ToolStrip)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (7)
50ToolStrip oldSelectionParent = oldSelection.GetCurrentParent(); 51ToolStrip newSelectionParent = newSelection.GetCurrentParent(); 395ToolStrip parent = null; 549ToolStrip parentToolStrip = itemDesigner.GetMainToolStrip(); 597ToolStrip owner = selectedItem.Owner; 654ToolStrip parentToolStrip = currentDropItem.GetCurrentParent(); 970ToolStrip parentToolStrip = itemDesigner.GetMainToolStrip();
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (2)
58private ToolStrip ParentTool 514ToolStrip parent = ParentTool;
System\Windows\Forms\Design\ToolStripItemDataObject.cs (2)
11internal ToolStripItemDataObject(List<ToolStripItem> dragComponents, ToolStripItem primarySelection, ToolStrip owner) : base() 20internal ToolStrip Owner { get; }
System\Windows\Forms\Design\ToolStripItemDesigner.cs (18)
159ToolStrip parent = ToolStripItem.GetCurrentParent(); 175ToolStrip strip = ToolStripItem.Owner; 329ToolStrip immediateParent = ImmediateParent as ToolStrip; 491internal virtual ToolStrip GetMainToolStrip() => ToolStripItem.Owner; 566ToolStrip parent = ToolStripItem.GetCurrentParent(); 703ToolStrip parent = (ToolStrip)ImmediateParent; 924ToolStrip tool = GetMainToolStrip(); 927ToolStrip owner = ImmediateParent as ToolStrip; 1041ToolStrip parent = (ToolStrip)ImmediateParent; 1044parent = ParentComponent as ToolStrip; 1096ToolStrip parent = (ToolStrip)ImmediateParent; 1193ToolStrip parent = ImmediateParent as ToolStrip;
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (23)
173ToolStrip owner = curDesignerNode.GetCurrentParent(); 296private static ToolStripItem GetNextItem(ToolStrip parent, ToolStripItem startItem, ArrowDirection direction) 456if (comp is ToolStrip) 603ToolStrip parent = null; 679ToolStrip parent = item.GetCurrentParent(); 724ToolStrip parent = item.GetCurrentParent(); 765ToolStrip parent = selectedItem.GetCurrentParent(); 779if (selectedObj is ToolStrip) 781ToolStrip parent = selectedObj as ToolStrip; 1085ToolStrip tool = primarySelection as ToolStrip; 1113ToolStrip tool = primarySelection as ToolStrip; 1161else if (selectionService.PrimarySelection is ToolStrip) 1263ToolStrip mainTool = owner.GetCurrentParent(); 1414if (item.Owner is ToolStrip owner) 1707ToolStrip owner = toolStripItem.Owner; 1803if (targetSelection is null && ctl is ToolStrip wb) 1837ToolStrip parent = item.GetCurrentParent(); 1848if (item.Owner is ToolStrip owner) 1937ToolStrip parent = item.GetCurrentParent(); 2002private void SelectItems(ToolStrip parent)
System\Windows\Forms\Design\ToolStripMenuItemCodeDomSerializer.cs (1)
39ToolStrip? parent = item.GetCurrentParent();
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (7)
233ToolStrip mainStrip = GetMainToolStrip(); 1376internal override ToolStrip GetMainToolStrip() 1525ToolStrip main = GetMainToolStrip(); 1771ToolStrip mainStrip = GetMainToolStrip(); 1819ToolStrip mainStrip = GetMainToolStrip(); 2020ToolStrip mainStrip = GetMainToolStrip(); 2069ToolStrip mainStrip = GetMainToolStrip();
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (4)
147=> control is ToolStrip; 174if (!typeof(ToolStrip).IsAssignableFrom(toolType)) 304if (typeof(ToolStrip).IsAssignableFrom(toolType)) 360if (e.Control is not ToolStrip)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (7)
295public ToolStrip EditorToolStrip 388if (_component is ToolStrip && SelectionService is not null) 413ToolStrip parent = _controlHost.GetCurrentParent(); 652if (_component is ToolStrip strip) 1176if (sender is ToolStrip strip) 1290if (_component is ToolStrip strip) 1423if (currentItem is ToolStrip strip)