86 references to ToolStripItem
System.Windows.Forms.Design (86)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (82)
49
ToolStripItem
.AutoSize = value;
93
_toolStripItemCustomMenuItemCollection ??= new ToolStripItemCustomMenuItemCollection(Component.Site,
ToolStripItem
);
157
if (
ToolStripItem
is not null)
159
ToolStrip parent =
ToolStripItem
.GetCurrentParent();
160
return parent ??
ToolStripItem
.Owner;
173
if (
ToolStripItem
.IsOnOverflow)
175
ToolStrip strip =
ToolStripItem
.Owner;
182
if (
ToolStripItem
is ToolStripDropDownItem)
184
ToolStripDropDownItem item =
ToolStripItem
as ToolStripDropDownItem;
189
if (value !=
ToolStripItem
.Overflow)
191
ToolStripItem
.Overflow = value;
204
if (
ToolStripItem
is not null)
206
if (
ToolStripItem
.IsOnDropDown && !
ToolStripItem
.IsOnOverflow)
253
Component startComp =
ToolStripItem
;
315
_editorNode = new ToolStripTemplateNode(
ToolStripItem
,
ToolStripItem
.Text);
334
ToolStripDesigner designer = (ToolStripDesigner)designerHost.GetDesigner(
ToolStripItem
.Owner);
371
PropertyDescriptor textProp = TypeDescriptor.GetProperties(
ToolStripItem
)["Text"];
372
string oldValue = (string)textProp.GetValue(
ToolStripItem
);
375
textProp.SetValue(
ToolStripItem
, text);
452
ToolStripItem
?.Paint -= OnItemPaint;
489
protected virtual Component GetOwnerForActionList() => (
ToolStripItem
.Placement == ToolStripItemPlacement.Main) ?
ToolStripItem
.GetCurrentParent() :
ToolStripItem
.Owner;
491
internal virtual ToolStrip GetMainToolStrip() =>
ToolStripItem
.Owner;
499
r =
ToolStripItem
.Bounds;
559
ToolStripDesignerUtils.GetAdjustedBounds(
ToolStripItem
, ref r);
564
if (
ToolStripItem
.IsOnDropDown)
566
ToolStrip parent =
ToolStripItem
.GetCurrentParent();
567
parent ??=
ToolStripItem
.Owner;
612
ToolStripItem
.AutoSize = AutoSize;
625
AutoSize =
ToolStripItem
.AutoSize;
630
AccessibleName =
ToolStripItem
.AccessibleName;
631
ToolStripItem
.Paint += OnItemPaint;
634
ToolStripItem
.AccessibleName =
ToolStripItem
.Name;
663
PropertyDescriptor pd = TypeDescriptor.GetProperties(
ToolStripItem
)["Text"];
707
parent =
ToolStripItem
.Owner;
712
int dummyIndex = parent.Items.IndexOf(
ToolStripItem
);
713
string name =
ToolStripItem
.Name;
717
if (
ToolStripItem
.IsOnDropDown)
745
ToolStripDropDownItem dropDownItem =
ToolStripItem
as ToolStripDropDownItem;
774
parent.Items.Remove(
ToolStripItem
);
775
host.DestroyComponent(
ToolStripItem
);
864
host.Container.Add(
ToolStripItem
);
865
parent.Items.Insert(dummyIndex,
ToolStripItem
);
882
if (e.Component ==
ToolStripItem
)
884
ToolStripItem
.AccessibleName = e.NewName;
893
if (
ToolStripItem
.GetCurrentParent() is ToolStripDropDown
895
&&
ToolStripItem
.Equals(_selectionService.PrimarySelection)
899
Rectangle r =
ToolStripItem
.Bounds;
921
if (
ToolStripItem
.AccessibilityObject is ToolStripItem.ToolStripItemAccessibleObject acc)
925
if (sSvc.GetComponentSelected(
ToolStripItem
))
944
if (currentSelection ==
ToolStripItem
)
959
if (currentSelection is not null && currentSelection.Equals(
ToolStripItem
) && !(
ToolStripItem
is ToolStripMenuItem))
1047
parent.Items.Remove(
ToolStripItem
);
1048
host.DestroyComponent(
ToolStripItem
);
1059
private void RestoreAutoSize() =>
ToolStripItem
.AutoSize = (bool)ShadowProperties[nameof(AutoSize)];
1069
private void RestoreOverflow() =>
ToolStripItem
.Overflow = (ToolStripItemOverflow)ShadowProperties[nameof(Overflow)];
1074
private void ResetOverflow() =>
ToolStripItem
.Overflow = ToolStripItemOverflow.AsNeeded;
1084
private void RestoreAccessibleName() =>
ToolStripItem
.AccessibleName = (string)ShadowProperties[nameof(AccessibleName)];
1089
if (
ToolStripItem
is ToolStripDropDownItem)
1099
parent =
ToolStripItem
.Owner;
1102
int currentIndex = parent.Items.IndexOf(
ToolStripItem
);
1146
ToolStripItem
.Visible = true;
1157
ToolStripItem
.Visible = _currentVisible;
1185
if (
ToolStripItem
is ToolStripMenuItem)
1202
Rectangle origBoundsInAdornerWindow =
ToolStripItem
.Bounds;
1204
ToolStripItem
.AutoSize = false;
1205
_editorNode.SetWidth(
ToolStripItem
.Text);
1208
ToolStripItem
.Width = _editorNode.EditorToolStrip.Width + 2;
1212
ToolStripItem
.Height = _editorNode.EditorToolStrip.Height;
1221
if (
ToolStripItem
.Placement != ToolStripItemPlacement.None)
1223
Rectangle boundsInAdornerWindow =
ToolStripItem
.Bounds;
1230
boundsInAdornerWindow.Y += (
ToolStripItem
.Height - _editorNode.EditorToolStrip.Height) / 2;
1235
boundsInAdornerWindow.X += (
ToolStripItem
.Width - _editorNode.EditorToolStrip.Width) / 2;
1248
parentDesigner.EditManager.ActivateEditor(
ToolStripItem
);
1259
ToolStripItem
.AutoSize = AutoSize;
1260
if (
ToolStripItem
is ToolStripDropDownItem) // We have no place to show this item... so Hide the DropDown
1262
if (
ToolStripItem
is ToolStripDropDownItem ddItem)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (4)
248
get =>
ToolStripItem
as ToolStripDropDownItem;
326
if (
ToolStripItem
is not null)
328
if (!
ToolStripItem
.IsOnOverflow &&
ToolStripItem
.IsOnDropDown)