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