87 references to ToolStripItem
System.Windows.Forms.Design (87)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (83)
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);
374
PropertyDescriptor textProp = TypeDescriptor.GetProperties(
ToolStripItem
)["Text"];
375
string oldValue = (string)textProp.GetValue(
ToolStripItem
);
378
textProp.SetValue(
ToolStripItem
, text);
464
if (
ToolStripItem
is not null)
466
ToolStripItem
.Paint -= OnItemPaint;
507
protected virtual Component GetOwnerForActionList() => (
ToolStripItem
.Placement == ToolStripItemPlacement.Main) ?
ToolStripItem
.GetCurrentParent() :
ToolStripItem
.Owner;
509
internal virtual ToolStrip GetMainToolStrip() =>
ToolStripItem
.Owner;
517
r =
ToolStripItem
.Bounds;
577
ToolStripDesignerUtils.GetAdjustedBounds(
ToolStripItem
, ref r);
582
if (
ToolStripItem
.IsOnDropDown)
584
ToolStrip parent =
ToolStripItem
.GetCurrentParent();
585
parent ??=
ToolStripItem
.Owner;
630
ToolStripItem
.AutoSize = AutoSize;
646
AutoSize =
ToolStripItem
.AutoSize;
651
AccessibleName =
ToolStripItem
.AccessibleName;
652
ToolStripItem
.Paint += OnItemPaint;
655
ToolStripItem
.AccessibleName =
ToolStripItem
.Name;
684
PropertyDescriptor pd = TypeDescriptor.GetProperties(
ToolStripItem
)["Text"];
728
parent =
ToolStripItem
.Owner;
733
int dummyIndex = parent.Items.IndexOf(
ToolStripItem
);
734
string name =
ToolStripItem
.Name;
738
if (
ToolStripItem
.IsOnDropDown)
766
ToolStripDropDownItem dropDownItem =
ToolStripItem
as ToolStripDropDownItem;
795
parent.Items.Remove(
ToolStripItem
);
796
host.DestroyComponent(
ToolStripItem
);
885
host.Container.Add(
ToolStripItem
);
886
parent.Items.Insert(dummyIndex,
ToolStripItem
);
906
if (e.Component ==
ToolStripItem
)
908
ToolStripItem
.AccessibleName = e.NewName;
917
if (
ToolStripItem
.GetCurrentParent() is ToolStripDropDown
919
&&
ToolStripItem
.Equals(_selectionService.PrimarySelection)
923
Rectangle r =
ToolStripItem
.Bounds;
945
if (
ToolStripItem
.AccessibilityObject is ToolStripItem.ToolStripItemAccessibleObject acc)
949
if (sSvc.GetComponentSelected(
ToolStripItem
))
968
if (currentSelection ==
ToolStripItem
)
983
if (currentSelection is not null && currentSelection.Equals(
ToolStripItem
) && !(
ToolStripItem
is ToolStripMenuItem))
1071
parent.Items.Remove(
ToolStripItem
);
1072
host.DestroyComponent(
ToolStripItem
);
1083
private void RestoreAutoSize() =>
ToolStripItem
.AutoSize = (bool)ShadowProperties[nameof(AutoSize)];
1093
private void RestoreOverflow() =>
ToolStripItem
.Overflow = (ToolStripItemOverflow)ShadowProperties[nameof(Overflow)];
1098
private void ResetOverflow() =>
ToolStripItem
.Overflow = ToolStripItemOverflow.AsNeeded;
1108
private void RestoreAccessibleName() =>
ToolStripItem
.AccessibleName = (string)ShadowProperties[nameof(AccessibleName)];
1113
if (
ToolStripItem
is ToolStripDropDownItem)
1123
parent =
ToolStripItem
.Owner;
1126
int currentIndex = parent.Items.IndexOf(
ToolStripItem
);
1170
ToolStripItem
.Visible = true;
1181
ToolStripItem
.Visible = _currentVisible;
1209
if (
ToolStripItem
is ToolStripMenuItem)
1226
Rectangle origBoundsInAdornerWindow =
ToolStripItem
.Bounds;
1228
ToolStripItem
.AutoSize = false;
1229
_editorNode.SetWidth(
ToolStripItem
.Text);
1232
ToolStripItem
.Width = _editorNode.EditorToolStrip.Width + 2;
1236
ToolStripItem
.Height = _editorNode.EditorToolStrip.Height;
1245
if (
ToolStripItem
.Placement != ToolStripItemPlacement.None)
1247
Rectangle boundsInAdornerWindow =
ToolStripItem
.Bounds;
1254
boundsInAdornerWindow.Y += (
ToolStripItem
.Height - _editorNode.EditorToolStrip.Height) / 2;
1259
boundsInAdornerWindow.X += (
ToolStripItem
.Width - _editorNode.EditorToolStrip.Width) / 2;
1272
parentDesigner.EditManager.ActivateEditor(
ToolStripItem
);
1283
ToolStripItem
.AutoSize = AutoSize;
1284
if (
ToolStripItem
is ToolStripDropDownItem) // We have no place to show this item... so Hide the DropDown
1286
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)