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);
371
PropertyDescriptor textProp = TypeDescriptor.GetProperties(
ToolStripItem
)["Text"];
372
string oldValue = (string)textProp.GetValue(
ToolStripItem
);
375
textProp.SetValue(
ToolStripItem
, text);
452
if (
ToolStripItem
is not null)
454
ToolStripItem
.Paint -= OnItemPaint;
495
protected virtual Component GetOwnerForActionList() => (
ToolStripItem
.Placement == ToolStripItemPlacement.Main) ?
ToolStripItem
.GetCurrentParent() :
ToolStripItem
.Owner;
497
internal virtual ToolStrip GetMainToolStrip() =>
ToolStripItem
.Owner;
505
r =
ToolStripItem
.Bounds;
565
ToolStripDesignerUtils.GetAdjustedBounds(
ToolStripItem
, ref r);
570
if (
ToolStripItem
.IsOnDropDown)
572
ToolStrip parent =
ToolStripItem
.GetCurrentParent();
573
parent ??=
ToolStripItem
.Owner;
618
ToolStripItem
.AutoSize = AutoSize;
631
AutoSize =
ToolStripItem
.AutoSize;
636
AccessibleName =
ToolStripItem
.AccessibleName;
637
ToolStripItem
.Paint += OnItemPaint;
640
ToolStripItem
.AccessibleName =
ToolStripItem
.Name;
669
PropertyDescriptor pd = TypeDescriptor.GetProperties(
ToolStripItem
)["Text"];
713
parent =
ToolStripItem
.Owner;
718
int dummyIndex = parent.Items.IndexOf(
ToolStripItem
);
719
string name =
ToolStripItem
.Name;
723
if (
ToolStripItem
.IsOnDropDown)
751
ToolStripDropDownItem dropDownItem =
ToolStripItem
as ToolStripDropDownItem;
780
parent.Items.Remove(
ToolStripItem
);
781
host.DestroyComponent(
ToolStripItem
);
870
host.Container.Add(
ToolStripItem
);
871
parent.Items.Insert(dummyIndex,
ToolStripItem
);
888
if (e.Component ==
ToolStripItem
)
890
ToolStripItem
.AccessibleName = e.NewName;
899
if (
ToolStripItem
.GetCurrentParent() is ToolStripDropDown
901
&&
ToolStripItem
.Equals(_selectionService.PrimarySelection)
905
Rectangle r =
ToolStripItem
.Bounds;
927
if (
ToolStripItem
.AccessibilityObject is ToolStripItem.ToolStripItemAccessibleObject acc)
931
if (sSvc.GetComponentSelected(
ToolStripItem
))
950
if (currentSelection ==
ToolStripItem
)
965
if (currentSelection is not null && currentSelection.Equals(
ToolStripItem
) && !(
ToolStripItem
is ToolStripMenuItem))
1053
parent.Items.Remove(
ToolStripItem
);
1054
host.DestroyComponent(
ToolStripItem
);
1065
private void RestoreAutoSize() =>
ToolStripItem
.AutoSize = (bool)ShadowProperties[nameof(AutoSize)];
1075
private void RestoreOverflow() =>
ToolStripItem
.Overflow = (ToolStripItemOverflow)ShadowProperties[nameof(Overflow)];
1080
private void ResetOverflow() =>
ToolStripItem
.Overflow = ToolStripItemOverflow.AsNeeded;
1090
private void RestoreAccessibleName() =>
ToolStripItem
.AccessibleName = (string)ShadowProperties[nameof(AccessibleName)];
1095
if (
ToolStripItem
is ToolStripDropDownItem)
1105
parent =
ToolStripItem
.Owner;
1108
int currentIndex = parent.Items.IndexOf(
ToolStripItem
);
1152
ToolStripItem
.Visible = true;
1163
ToolStripItem
.Visible = _currentVisible;
1191
if (
ToolStripItem
is ToolStripMenuItem)
1208
Rectangle origBoundsInAdornerWindow =
ToolStripItem
.Bounds;
1210
ToolStripItem
.AutoSize = false;
1211
_editorNode.SetWidth(
ToolStripItem
.Text);
1214
ToolStripItem
.Width = _editorNode.EditorToolStrip.Width + 2;
1218
ToolStripItem
.Height = _editorNode.EditorToolStrip.Height;
1227
if (
ToolStripItem
.Placement != ToolStripItemPlacement.None)
1229
Rectangle boundsInAdornerWindow =
ToolStripItem
.Bounds;
1236
boundsInAdornerWindow.Y += (
ToolStripItem
.Height - _editorNode.EditorToolStrip.Height) / 2;
1241
boundsInAdornerWindow.X += (
ToolStripItem
.Width - _editorNode.EditorToolStrip.Width) / 2;
1254
parentDesigner.EditManager.ActivateEditor(
ToolStripItem
);
1265
ToolStripItem
.AutoSize = AutoSize;
1266
if (
ToolStripItem
is ToolStripDropDownItem) // We have no place to show this item... so Hide the DropDown
1268
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)