1 write to _host
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1397_host = GetRequiredService<IDesignerHost>();
32 references to _host
System.Windows.Forms.Design (32)
System\Windows\Forms\Design\ToolStripDesigner.cs (32)
456ToolStripItemDesigner dropDownItemDesigner = (ToolStripItemDesigner)_host.GetDesigner(item); 476Debug.Assert(_host is not null, "Why didn't we get a designer host?"); 477NewItemTransaction = _host.CreateTransaction(SR.ToolStripCreatingNewItemTransaction); 490component = _host.CreateComponent(t); 491designer = _host.GetDesigner(component) as ToolStripItemDesigner; 525Debug.Assert(_host is not null, "Why didn't we get a designer host?"); 527DesignerTransaction outerTransaction = _host.CreateTransaction(string.Format(SR.ToolStripAddingItem, t.Name)); 535IComponent component = _host.CreateComponent(t, NameFromText(text, t, Component.Site)); 536ToolStripItemDesigner designer = _host.GetDesigner(component) as ToolStripItemDesigner; 783if (_host.GetDesigner(selectedItem) is ToolStripMenuItemDesigner itemDesigner && itemDesigner.IsEditorActive) 799if (_host.GetDesigner(ownerItem) is ToolStripMenuItemDesigner itemDesigner && itemDesigner.IsEditorActive) 811ToolStripItemDesigner itemDesigner = (ToolStripItemDesigner)_host.GetDesigner(toolItem); 969Debug.Assert(_host is not null, "Why didn't we get a designer host?"); 970_insertMenuItemTransaction = _pendingTransaction = _host.CreateTransaction(SR.ToolStripDesignerTransactionAddingItem); 1077Debug.Assert(_host is not null, "Why didn't we get a designer host?"); 1081_pendingTransaction = _host.CreateTransaction(SR.ToolStripDesignerTransactionRemovingItem); 1224if (_host is not null) 1226IDesigner itemDesigner = _host.GetDesigner(selectedItem); 1265ToolStripItemDesigner itemDesigner = (ToolStripItemDesigner)_host.GetDesigner(toolItem); 1288ToolStripItemDesigner itemDesigner = (ToolStripItemDesigner)_host.GetDesigner(item); 1342ToolStripItemDesigner itemDesigner = (ToolStripItemDesigner)_host.GetDesigner(item); 1398_componentChangeService = _host.GetService<IComponentChangeService>(); 1481Form parentForm = _host.RootComponent as Form; 1486parentFormDesigner = _host.GetDesigner(parentForm) as FormDocumentDesigner; 1875DesignerTransaction changeParent = _host.CreateTransaction(transDesc); 1927if (_host.GetDesigner(primaryDropDownItem) is ToolStripMenuItemDesigner dropDownItemDesigner) 2070&& _host.GetDesigner(item) is ToolStripItemDesigner designer) 2153if (_host.GetDesigner(selectedItem) is ToolStripMenuItemDesigner selectedItemDesigner) 2254ToolStripItemDesigner dropDownItemDesigner = (ToolStripItemDesigner)_host.GetDesigner(item); 2345if (_miniToolStrip is not null && _host is not null) 2431if (_host.GetDesigner(newItem) is ToolStripItemDesigner newItemDesigner) 2469ToolStripItemDesigner itemDesigner = (ToolStripItemDesigner)_host.GetDesigner(item);