1 interface inheriting from IDesignerHost
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\Serialization\IDesignerLoaderHost.cs (1)
16public interface IDesignerLoaderHost : IDesignerHost
691 references to IDesignerHost
netstandard (1)
netstandard.cs (1)
255[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.IDesignerHost))]
System (1)
src\runtime\src\libraries\shims\System\ref\System.cs (1)
241[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.IDesignerHost))]
System.ComponentModel.TypeConverter (31)
System\ComponentModel\AmbientValueAttribute.cs (4)
21private static readonly object? s_throwSentinel = IDesignerHost.IsSupported ? null : new(); 33Debug.Assert(IDesignerHost.IsSupported, "Runtime instantiation of this attribute is not allowed with trimming."); 34if (!IDesignerHost.IsSupported) 147if (!IDesignerHost.IsSupported && ReferenceEquals(_value, s_throwSentinel))
System\ComponentModel\Design\ActiveDesignerEventArgs.cs (4)
16public ActiveDesignerEventArgs(IDesignerHost? oldDesigner, IDesignerHost? newDesigner) 25public IDesignerHost? OldDesigner { get; } 30public IDesignerHost? NewDesigner { get; }
System\ComponentModel\Design\DesignerCollection.cs (5)
17/// that stores an array with a pointer to each <see cref='System.ComponentModel.Design.IDesignerHost'/> 20public DesignerCollection(IDesignerHost[]? designers) 34/// that stores an array with a pointer to each <see cref='System.ComponentModel.Design.IDesignerHost'/> 50public virtual IDesignerHost? this[int index] => (IDesignerHost?)_designers[index];
System\ComponentModel\Design\DesignerEventArgs.cs (2)
16public DesignerEventArgs(IDesignerHost? host) 24public IDesignerHost? Designer { get; }
System\ComponentModel\Design\IComponentDiscoveryService.cs (1)
19ICollection GetComponentTypes(IDesignerHost? designerHost, Type? baseType);
System\ComponentModel\Design\IDesignerEventService.cs (1)
14IDesignerHost? ActiveDesigner { get; }
System\ComponentModel\Design\IDesignerHost.cs (7)
52/// Adds an event handler for the <see cref='System.ComponentModel.Design.IDesignerHost.Activated'/> event. 57/// Adds an event handler for the <see cref='System.ComponentModel.Design.IDesignerHost.Deactivated'/> event. 62/// Adds an event handler for the <see cref='System.ComponentModel.Design.IDesignerHost.LoadComplete'/> event. 67/// Adds an event handler for the <see cref='System.ComponentModel.Design.IDesignerHost.TransactionClosed'/> event. 72/// Adds an event handler for the <see cref='System.ComponentModel.Design.IDesignerHost.TransactionClosing'/> event. 77/// Adds an event handler for the <see cref='System.ComponentModel.Design.IDesignerHost.TransactionOpened'/> event. 82/// Adds an event handler for the <see cref='System.ComponentModel.Design.IDesignerHost.TransactionOpening'/> event.
System\ComponentModel\ToolboxItemAttribute.cs (1)
45if (!IDesignerHost.IsSupported)
System\ComponentModel\TypeDescriptor.cs (3)
661IDesignerHost? host = site.GetService(typeof(IDesignerHost)) as IDesignerHost;
System\Timers\Timer.cs (3)
220IDesignerHost? host = (IDesignerHost?)GetService(typeof(IDesignerHost));
System.Diagnostics.EventLog (3)
System\Diagnostics\EventLogInternal.cs (3)
382IDesignerHost? host = (IDesignerHost?)parent.ComponentGetService(typeof(IDesignerHost));
System.Windows.Forms (28)
System\Windows\Forms\ActiveX\AxHost.cs (2)
1987if (Site.TryGetService(out IDesignerHost? host) && host.RootComponent is ContainerControl rootControl) 3016Site.TryGetService(out IDesignerHost? host);
System\Windows\Forms\Control.cs (1)
5377&& site.TryGetService(out IDesignerHost? host)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (9)
62private IDesignerHost? _designerHost; 245internal IDesignerHost? ActiveDesigner 247get => _designerHost ??= GetService<IDesignerHost>(); 1159ActiveDesigner = value?.GetService<IDesignerHost>(); 1479IDesignerHost? host = null; 1482host = site.GetService<IDesignerHost>(); 1637private PropertyTab? CreateTab(Type tabType, IDesignerHost? host) 1658constructor = tabType.GetConstructor([typeof(IDesignerHost)]); 1764if (_selectedObjects.Length == 1 && site.TryGetService(out IDesignerHost? designerHost))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
20/// <see cref="IDesigner.Verbs"/> from any associated <see cref="IDesignerHost"/>. Note that
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (3)
232/// The currently active <see cref="IDesignerHost"/>, if any. 240internal virtual IDesignerHost? DesignerHost 881IDesignerHost? currentHost,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (1)
274IDesignerHost? host = DesignerHost;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.cs (1)
22IDesignerHost? host,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (2)
568IDesignerHost? host = DesignerHost; 827IDesignerHost? host = DesignerHost;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (3)
18private IDesignerHost? _host; 30IDesignerHost? host, 114internal sealed override IDesignerHost? DesignerHost
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1134if (Site.TryGetService(out IDesignerHost? host) && host.RootComponent is ContainerControl rootContainerControl)
System\Windows\Forms\Design\EventsTab.cs (2)
16private IDesignerHost? _currentHost; 52/// This looks first at the current <see cref="IDesignerHost"/>, then the <paramref name="object"/>'s
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (2)
98if (value.GetService(typeof(IDesignerHost)) is IDesignerHost host)
System.Windows.Forms.Design (625)
System\ComponentModel\Design\BinaryEditor.cs (1)
27return _context.TryGetService(out IDesignerHost? designerhost)
System\ComponentModel\Design\CollectionEditor.cs (5)
95if (Context.TryGetService(out IDesignerHost? host) && typeof(IComponent).IsAssignableFrom(itemType)) 124nameof(IDesignerHost), 201if (Context.TryGetService(out IDesignerHost? host)) 238IDesignerHost? host = Context?.GetService<IDesignerHost>();
System\ComponentModel\Design\ComponentDesigner.cs (9)
82IComponent? root = GetService<IDesignerHost>()?.RootComponent; 196if (comps is not null && comps.Count > 0 && TryGetService(out IDesignerHost? host)) 225if (parent is not null && TryGetService(out IDesignerHost? host)) 259IDesignerHost? host = GetService<IDesignerHost>(); 368return TryGetService(out IDesignerHost? host) && _component == host.RootComponent; 383bool isRoot = TryGetService(out IDesignerHost? host) && component == host.RootComponent; 473IComponent? rootComponent = GetService<IDesignerHost>()?.RootComponent; 497IComponent? rootComponent = GetService<IDesignerHost>()?.RootComponent;
System\ComponentModel\Design\DataSourceProviderService.cs (1)
22public abstract object AddDataSourceInstance(IDesignerHost host, DataSourceDescriptor dataSourceDescriptor);
System\ComponentModel\Design\DesignerActionPanel.cs (2)
618IDesignerHost? host = serviceProvider.GetService<IDesignerHost>();
System\ComponentModel\Design\DesignerActionService.cs (4)
36IDesignerHost? host = serviceProvider.GetService<IDesignerHost>(); 133IDesignerHost? host = _serviceProvider.GetService<IDesignerHost>();
System\ComponentModel\Design\DesignerActionUI.cs (6)
279IDesignerHost? host = _serviceProvider.GetService<IDesignerHost>(); 302IDesignerHost host = _serviceProvider.GetRequiredService<IDesignerHost>(); 538if (_serviceProvider.TryGetService(out IDesignerHost? host) && host.InTransaction) 549if (_serviceProvider.TryGetService(out IDesignerHost? host))
System\ComponentModel\Design\DesignerActionUIService.cs (4)
20IDesignerHost host = serviceProvider.GetRequiredService<IDesignerHost>(); 34IDesignerHost? host = _serviceProvider.GetService<IDesignerHost>();
System\ComponentModel\Design\DesignerEventService.cs (14)
19private List<IDesignerHost>? _designerList; // read write list used as data for the collection 21private IDesignerHost? _activeDesigner; // the currently active designer. Can be null 40IDesignerHost? host = null; 43host = surface.GetService(typeof(IDesignerHost)) as IDesignerHost; 58IDesignerHost? oldDesigner = _activeDesigner; 84if (ce.Component?.Site?.Container is IDesignerHost { Loading: true }) 120IDesignerHost? host = surface.GetService<IDesignerHost>(); 146IDesignerHost? host = surface.GetService<IDesignerHost>(); 239IDesignerHost? host = provider.GetService<IDesignerHost>(); 294IDesignerHost? IDesignerEventService.ActiveDesigner => _activeDesigner;
System\ComponentModel\Design\DesignerHost.cs (42)
27private static readonly Type[] s_defaultServices = [typeof(IDesignerHost), typeof(IContainer), typeof(IComponentChangeService), typeof(IDesignerLoaderHost2)]; 705DesignerTransaction t = ((IDesignerHost)this).CreateTransaction(); 840if (!((IDesignerHost)this).Loading) 850if (!((IDesignerHost)this).Loading) 856bool IDesignerHost.Loading => 859bool IDesignerHost.InTransaction => (_transactions is not null && _transactions.Count > 0) || IsClosingTransaction; 861IContainer IDesignerHost.Container => this; 863IComponent IDesignerHost.RootComponent => _rootComponent!; 865string IDesignerHost.RootComponentClassName => _rootComponentClassName!; 867string IDesignerHost.TransactionDescription => 872event EventHandler IDesignerHost.Activated 878event EventHandler IDesignerHost.Deactivated 884event EventHandler IDesignerHost.LoadComplete 890event DesignerTransactionCloseEventHandler IDesignerHost.TransactionClosed 896event DesignerTransactionCloseEventHandler IDesignerHost.TransactionClosing 902event EventHandler IDesignerHost.TransactionOpened 908event EventHandler IDesignerHost.TransactionOpening 914void IDesignerHost.Activate() => _surface?.OnViewActivate(); 918IComponent IDesignerHost.CreateComponent(Type componentType) => 919((IDesignerHost)this).CreateComponent(componentType, null!); 921IComponent IDesignerHost.CreateComponent(Type componentType, string name) 981DesignerTransaction IDesignerHost.CreateTransaction() => 982((IDesignerHost)this).CreateTransaction(SR.DesignerHostGenericTransactionName); 984DesignerTransaction IDesignerHost.CreateTransaction(string description) => 987void IDesignerHost.DestroyComponent(IComponent component) 1002if (((IDesignerHost)this).InTransaction) 1010using (t = ((IDesignerHost)this).CreateTransaction(string.Format(SR.DesignerHostDestroyComponentTransaction, name))) 1022IDesigner? IDesignerHost.GetDesigner(IComponent component) 1029Type? IDesignerHost.GetType(string typeName) 1090IRootDesigner rootDesigner = (((IDesignerHost)this).GetDesigner(_rootComponent!) as IRootDesigner) 1198typeof(IDesignerHost).GetMethod(name, bindingAttr, binder, types, modifiers); 1201MethodInfo? IReflect.GetMethod(string name, BindingFlags bindingAttr) => typeof(IDesignerHost).GetMethod(name, bindingAttr); 1204MethodInfo[] IReflect.GetMethods(BindingFlags bindingAttr) => typeof(IDesignerHost).GetMethods(bindingAttr); 1207FieldInfo? IReflect.GetField(string name, BindingFlags bindingAttr) => typeof(IDesignerHost).GetField(name, bindingAttr); 1210FieldInfo[] IReflect.GetFields(BindingFlags bindingAttr) => typeof(IDesignerHost).GetFields(bindingAttr); 1213PropertyInfo? IReflect.GetProperty(string name, BindingFlags bindingAttr) => typeof(IDesignerHost).GetProperty(name, bindingAttr); 1217typeof(IDesignerHost).GetProperty(name, bindingAttr, binder, returnType, types, modifiers); 1220PropertyInfo[] IReflect.GetProperties(BindingFlags bindingAttr) => typeof(IDesignerHost).GetProperties(bindingAttr); 1236MemberInfo[] IReflect.GetMember(string name, BindingFlags bindingAttr) => typeof(IDesignerHost).GetMember(name, bindingAttr); 1239MemberInfo[] IReflect.GetMembers(BindingFlags bindingAttr) => typeof(IDesignerHost).GetMembers(bindingAttr); 1251typeof(IDesignerHost).InvokeMember(name, invokeAttr, binder, target, args, modifiers, culture, namedParameters); 1253Type IReflect.UnderlyingSystemType => typeof(IDesignerHost).UnderlyingSystemType;
System\ComponentModel\Design\DesignSurface.cs (4)
76return ((IDesignerHost)_host).Container; 130IComponent? rootComponent = ((IDesignerHost)_host).RootComponent; 156if (((IDesignerHost)_host).GetDesigner(rootComponent) is not IRootDesigner rootDesigner) 443IComponent? rootComponent = ((IDesignerHost)_host).RootComponent;
System\ComponentModel\Design\DesignSurfaceCollection.cs (3)
35IDesignerHost host = _designers[index]!; 85IDesignerHost host = (IDesignerHost)_designerEnumerator.Current!;
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (1)
213if (site.TryGetService(out IDesignerHost? host))
System\ComponentModel\Design\MenuCommandService.cs (1)
194if (_selectionService?.SelectionCount == 1 && TryGetService(out IDesignerHost? designerHost))
System\ComponentModel\Design\SelectionService.cs (6)
69if (GetService(typeof(IDesignerHost)) is IDesignerHost host) 223if (GetService(typeof(IDesignerHost)) is IDesignerHost host && _selection.Contains(host.RootComponent)) 273if (GetService(typeof(IDesignerHost)) is IDesignerHost host)
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
97if (TryGetService(out IDesignerHost? host))
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersExtenderProvider.cs (2)
18private IDesignerHost? _host; 51_host ??= component.Site?.GetService<IDesignerHost>();
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (2)
19private IDesignerHost? _host; 58_host ??= component.Site?.GetService<IDesignerHost>();
System\ComponentModel\Design\Serialization\CodeDomLocalizationProvider.LanguageExtenders.cs (2)
21private readonly IDesignerHost? _host; 30_host = serviceProvider.GetService<IDesignerHost>();
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
684if (manager.GetService<IDesignerHost>() is { } host)
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (5)
60/// for <see cref="IDesignerHost"/> in the service provider and uses its container if it exists. 68if (GetService(typeof(IDesignerHost)) is IDesignerHost host) 261if (GetService(typeof(IDesignerHost)) is IDesignerHost host && host.Container == Container)
System\ComponentModel\Design\ToolStripContainerActionList.cs (2)
16private readonly IDesignerHost? _designerHost; 26_designerHost = _serviceProvider?.GetService<IDesignerHost>();
System\ComponentModel\Design\TypeDescriptorFilterService.cs (1)
27if (site.TryGetService(out IDesignerHost? host))
System\ComponentModel\Design\UndoEngine.cs (2)
23private readonly IDesignerHost _host; 44_host = GetRequiredService<IDesignerHost>();
System\ComponentModel\Design\UndoEngine.UndoUnit.AddRemoveUndoEvent.cs (4)
76IDesignerHost host = engine.GetRequiredService<IDesignerHost>(); 84IDesignerHost host = engine.GetRequiredService<IDesignerHost>();
System\ComponentModel\Design\UndoEngine.UndoUnit.ChangeUndoEvent.cs (2)
117else if (engine.TryGetService(out IDesignerHost? host)) 158if (engine.TryGetService(out IDesignerHost? host))
System\Drawing\Design\IToolboxService.cs (10)
38void AddCreator(ToolboxItemCreatorCallback creator, string format, IDesignerHost host); 43void AddLinkedToolboxItem(ToolboxItem toolboxItem, IDesignerHost host); 48void AddLinkedToolboxItem(ToolboxItem toolboxItem, string category, IDesignerHost host); 68ToolboxItem DeserializeToolboxItem(object serializedObject, IDesignerHost host); 78ToolboxItem GetSelectedToolboxItem(IDesignerHost host); 88ToolboxItemCollection GetToolboxItems(IDesignerHost host); 98ToolboxItemCollection GetToolboxItems(string category, IDesignerHost host); 105bool IsSupported(object serializedObject, IDesignerHost host); 122bool IsToolboxItem(object serializedObject, IDesignerHost host); 137void RemoveCreator(string format, IDesignerHost host);
System\Drawing\Design\ToolboxComponentsCreatingEventArgs.cs (2)
17public ToolboxComponentsCreatingEventArgs(IDesignerHost? host) 26public IDesignerHost? DesignerHost { get; }
System\Drawing\Design\ToolboxItem.cs (6)
222public IComponent[]? CreateComponents(IDesignerHost? host) 239public IComponent[]? CreateComponents(IDesignerHost? host, IDictionary? defaultValues) 255protected virtual IComponent[]? CreateComponentsCore(IDesignerHost? host) 278protected virtual IComponent[]? CreateComponentsCore(IDesignerHost? host, IDictionary? defaultValues) 437public Type? GetType(IDesignerHost? host) => GetType(host, AssemblyName, TypeName, false); 446protected virtual Type? GetType(IDesignerHost? host, AssemblyName? assemblyName, string typeName, bool reference)
System\Windows\Forms\Design\BaseContextMenuStrip.cs (2)
83if (_serviceProvider.GetService(typeof(ISelectionService)) is ISelectionService selectionService && _serviceProvider.GetService(typeof(IDesignerHost)) is IDesignerHost host)
System\Windows\Forms\Design\Behavior\BehaviorService.cs (6)
82IDesignerHost? host = serviceProvider.GetService<IDesignerHost>(); 171_serviceProvider.GetService(typeof(IDesignerHost)) is IDesignerHost host) 786IDesignerHost? host = _serviceProvider.GetService<IDesignerHost>();
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (1)
209|| !_serviceProvider.TryGetService(out IDesignerHost? host))
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (5)
149if (!(serviceProvider.GetService(typeof(IDesignerHost)) is IDesignerHost host) || _behaviorService is null) 487if (_serviceProvider.GetService(typeof(IDesignerHost)) is IDesignerHost host) 522private void Initialize(List<IComponent>? dragComponents, IDesignerHost host)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (9)
68private readonly IDesignerHost _srcHost; 69private IDesignerHost _destHost; 100_srcHost = (IDesignerHost)_serviceProviderSource.GetService(typeof(IDesignerHost)); 316_destHost = (IDesignerHost)_serviceProviderTarget.GetService(typeof(IDesignerHost)); 643IDesignerHost newDestHost = (IDesignerHost)_serviceProviderTarget.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (5)
216if (_serviceProvider.GetService(typeof(IDesignerHost)) is IDesignerHost designerHost) 233IDesignerHost host = (IDesignerHost)_serviceProvider.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\Behavior\SelectionManager.cs (2)
25private IDesignerHost _designerHost; 50_designerHost = serviceProvider.GetRequiredService<IDesignerHost>();
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (3)
116IDesignerHost host = _serviceProvider.GetService(typeof(IDesignerHost)) as IDesignerHost;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
337if (_serviceProvider.TryGetService(out IDesignerHost? host))
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (4)
136var host = _serviceProvider.GetRequiredService<IDesignerHost>(); 265IDesignerHost host = _serviceProvider.GetRequiredService<IDesignerHost>();
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (2)
34IDesignerHost? host = _provider?.GetService<IDesignerHost>();
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (4)
54IDesignerHost? host = Component?.Site?.GetService<IDesignerHost>(); 95private void SiteItem(IDesignerHost? host, ToolStripItem item) 117private void SiteItems(IDesignerHost? host, ToolStripItemCollection items)
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (2)
18private readonly IDesignerHost _host; 26_host = _provider.GetService<IDesignerHost>();
System\Windows\Forms\Design\CommandSet.cs (37)
66if (site.TryGetService(out IDesignerHost? host)) 370if (site.TryGetService(out IDesignerHost? host)) 450if (TryGetService(out IDesignerHost? host)) 493IDesignerHost? host = site.GetService<IDesignerHost>(); 509private static void GetAssociatedComponents(IComponent component, IDesignerHost host, List<IComponent> list) 593protected virtual void GetSnapInformation(IDesignerHost host, IComponent component, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor? snapProperty) 679if (TryGetService(out IToolboxService? tbx) && tbx.GetSelectedToolboxItem(GetService<IDesignerHost>()) is not null) 711if (TryGetService(out IDesignerHost? host)) 728if (SelectionService?.PrimarySelection is IComponent comp && TryGetService(out IDesignerHost? host) && 980IDesignerHost? host = GetService<IDesignerHost>(); 1125IDesignerHost? host = GetService<IDesignerHost>(); 1248IDesignerHost? host = GetService<IDesignerHost>(); 1460if (TryGetService(out IDesignerHost? host)) 1577if (site is null || SelectionService is null || !TryGetService(out IDesignerHost? host)) 1835if (!TryGetService(out IDesignerHost? host)) 2190if (site is null || SelectionService is null || !TryGetService(out IDesignerHost? host)) 2236if (site is null || !TryGetService(out IDesignerHost? host)) 2310IDesignerHost? host = GetService<IDesignerHost>(); 2377IDesignerHost? host = GetService<IDesignerHost>(); 2472if (site.TryGetService(out IDesignerHost? host)) 2515IDesignerHost? host = GetService<IDesignerHost>(); 2894IDesignerHost? designerHost = GetService<IDesignerHost>(); 2988&& TryGetService(out IDesignerHost? host) 3042if (TryGetService(out IDesignerHost? host)) 3074if (TryGetService(out IDesignerHost? host) 3123IDesignerHost host = GetService<IDesignerHost>()!; 3337IDesignerHost? host = GetService<IDesignerHost>();
System\Windows\Forms\Design\ComponentTray.cs (46)
85IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 272IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 295IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 311IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 399IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 509IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 676IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 745IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 854IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1063IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1109_mouseDragTool = _toolboxService.DeserializeToolboxItem(de.Data, (IDesignerHost)GetService(typeof(IDesignerHost))); 1219ToolboxItem tool = _toolboxService.GetSelectedToolboxItem((IDesignerHost)GetService(typeof(IDesignerHost))); 1517IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1680IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 2074IDesignerHost host = (IDesignerHost)_tray.GetService(typeof(IDesignerHost)); 2477IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (3)
177IDesignerHost? host = manager.GetService<IDesignerHost>(); 220private void SerializeControlHierarchy(IDesignerSerializationManager manager, IDesignerHost host, object? value)
System\Windows\Forms\Design\ControlCommandSet.cs (32)
278IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 364protected override void GetSnapInformation(IDesignerHost host, IComponent component, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor snapProperty) 519IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 847IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 936IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 948_tabOrder = new TabOrder((IDesignerHost)GetService(typeof(IDesignerHost))); 978IDesignerHost designerHost = (IDesignerHost)GetService(typeof(IDesignerHost)); 1188IDesignerHost host = (IDesignerHost)site.GetService(typeof(IDesignerHost)); 1248if (site.TryGetService(out IDesignerHost host) 1265if (site.TryGetService(out IDesignerHost host) 1287IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1362IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1430IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ControlDesigner.ControlDesignerAccessibleObject.cs (3)
15private IDesignerHost? _host; 28private IDesignerHost DesignerHost => _host ??= _designer.GetRequiredService<IDesignerHost>();
System\Windows\Forms\Design\ControlDesigner.cs (7)
23private IDesignerHost? _host; // the host for our designer 164if ((!TryGetService(out IDesignerHost? host) || (host is not null && !host.Loading)) 375return TryGetService(out IDesignerHost? host) && Component == host.RootComponent; 946_host = GetService<IDesignerHost>(); 1164&& TryGetService(out IDesignerHost? host)) 1688_host ??= GetService<IDesignerHost>(); 1911if (_toolboxService?.GetSelectedToolboxItem(GetService<IDesignerHost>()) is not null)
System\Windows\Forms\Design\ControlDesigner.DockingActionList.cs (3)
13private readonly IDesignerHost? _host; 18_host = GetService(typeof(IDesignerHost)) as IDesignerHost;
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (6)
155IDesignerHost? host = _liveDataGridView.Site?.GetService<IDesignerHost>(); 635if (_liveDataGridView.Site.TryGetService(out IDesignerHost? host)) 660if (!_liveDataGridView.Site.TryGetService(out IDesignerHost? host)) 770IDesignerHost? host = _liveDataGridView.Site?.GetService<IDesignerHost>();
System\Windows\Forms\Design\DataGridViewColumnCollectionEditor.cs (1)
20!provider.TryGetService(out IDesignerHost? host))
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (3)
49IDesignerHost? host = null; 54host = dataGridView.Site.GetService<IDesignerHost>(); 277if (!TryGetService(out IDesignerHost? host))
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.cs (3)
29IDesignerHost? host = provider.GetService(typeof(IDesignerHost)) as IDesignerHost;
System\Windows\Forms\Design\DataGridViewDesigner.cs (14)
523IDesignerHost? host = site?.GetService<IDesignerHost>(); 732IDesignerHost? host = Component.Site?.GetService<IDesignerHost>(); 760IDesignerHost? host = Component.Site?.GetService<IDesignerHost>(); 856IDesignerHost? host = dataGridView.Site?.GetService<IDesignerHost>(); 899IDesignerHost? host = dataGridView.Site?.GetService<IDesignerHost>(); 942IDesignerHost? host = dataGridView.Site?.GetService<IDesignerHost>(); 985IDesignerHost? host = dataGridView.Site?.GetService<IDesignerHost>();
System\Windows\Forms\Design\DataGridViewDesigner.DataGridViewChooseDataSourceActionList.cs (2)
47IDesignerHost? host = dataGridView.Site?.GetService<IDesignerHost>();
System\Windows\Forms\Design\DataSourceProviderService.cs (1)
20public abstract object AddDataSourceInstance(IDesignerHost? host, DataSourceDescriptor dataSourceDescriptor);
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
101private IDesignerHost? _designerHost; // Service that provides access to current WinForms designer session 388_designerHost = _serviceProvider.GetService<IDesignerHost>();
System\Windows\Forms\Design\DesignerExtenders.NameExtenderProvider.cs (3)
34IDesignerHost? host = (IDesignerHost?)site.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\DesignerUtils.cs (5)
617public static string? GetUniqueSiteName(IDesignerHost host, string? name) 744IDesignerHost? host = svcProvider.GetService<IDesignerHost>(); 790private static List<IComponent> GetCopySelection(IReadOnlyList<IComponent> objects, IDesignerHost host) 802internal static void GetAssociatedComponents(IComponent component, IDesignerHost? host, List<IComponent> list)
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (3)
61protected override IComponent[] CreateComponentsCore(IDesignerHost? host) 160private Type? GetAxTypeFromReference(object reference, IDesignerHost host) 215private static object? GetReferences(IDesignerHost host)
System\Windows\Forms\Design\DocumentDesigner.cs (28)
112IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 254IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 329IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 583IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 640IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 798if (GetService(typeof(IDesignerHost)) is IDesignerHost host) 837if (!TryGetService(out IDesignerHost host)) 911IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 947IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1062((IDesignerHost)sender).LoadComplete -= OnLoadComplete; 1334IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
567DesignerTransaction designerTransaction = TryGetService(out IDesignerHost host)
System\Windows\Forms\Design\FormDocumentDesigner.cs (7)
130GetService<IDesignerHost>(); 289IDesignerHost host = GetService<IDesignerHost>(); 335IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 363if (ce.Component is ToolStrip && _toolStripAdornerWindowService is null && TryGetService(out IDesignerHost _))
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (2)
71protected override IComponent[]? CreateComponentsCore(IDesignerHost? host, IDictionary? defaultValues) 143protected override IComponent[]? CreateComponentsCore(IDesignerHost? host) => CreateComponentsCore(host, null);
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (4)
99IDesignerHost? host = _serviceProvider.GetService<IDesignerHost>(); 117private static void GetAssociatedComponents(IComponent component, IDesignerHost host, List<IComponent> list) 212IDesignerHost? host = null;
System\Windows\Forms\Design\OleDragDropHandler.cs (5)
144IDesignerHost? host = GetService<IDesignerHost>(); 522if (TryGetService(out IDesignerHost? host)) 667IDesignerHost host = GetService<IDesignerHost>()!;
System\Windows\Forms\Design\ParentControlDesigner.cs (50)
188IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 267IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 405IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 454IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 598private void AddChildComponents(IComponent component, IContainer container, IDesignerHost host) 690IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 896IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 999IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1063_oleDragDropHandler ??= new OleDragDropHandler(null, (IServiceProvider)GetService(typeof(IDesignerHost)), this); 1076IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1209IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1247if (GetService(typeof(IDesignerHost)) is not IDesignerHost host) 1422IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1491IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1611private void PerformDragEnter(DragEventArgs de, IDesignerHost host) 1676IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1719_mouseDragTool = _toolboxService.GetSelectedToolboxItem((IDesignerHost)GetService(typeof(IDesignerHost))); 2126private void ReParentControls(Control newParent, List<Control> controls, string transactionName, IDesignerHost host) 2307IDesignerHost localDesignerHost = (IDesignerHost)GetService(typeof(IDesignerHost)); 2467IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\SelectionUIHandler.cs (2)
306IDesignerHost? host = GetService<IDesignerHost>();
System\Windows\Forms\Design\SelectionUIService.cs (2)
53private readonly IDesignerHost _host; 60public SelectionUIService(IDesignerHost host) : base()
System\Windows\Forms\Design\SplitContainerDesigner.cs (3)
22private IDesignerHost? _designerHost; 239_designerHost = (IDesignerHost?)component.Site?.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\SplitterPanelDesigner.cs (3)
19private IDesignerHost? _designerHost; 110_designerHost = (IDesignerHost?)component.Site?.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\StandardMenuStripVerb.cs (5)
21private readonly IDesignerHost _host; 32_host = (IDesignerHost)_provider.GetService(typeof(IDesignerHost)); 66private void CreateStandardMenuStrip(IDesignerHost host, MenuStrip tool) 253private void CreateStandardToolStrip(IDesignerHost host, ToolStrip tool)
System\Windows\Forms\Design\StyleEditorForm.cs (4)
102var host = _tableLayoutPanel.Site.GetService<IDesignerHost>(); 1058var host = _tableLayoutPanel.Site.GetService<IDesignerHost>();
System\Windows\Forms\Design\TabControlDesigner.cs (12)
126IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 225IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 320IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 471IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\TableLayoutPanelCodeDomSerializer.cs (3)
48IDesignerHost? host = manager.GetService<IDesignerHost>(); 67private static bool IsLocalizable([NotNullWhen(true)] IDesignerHost? host)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (35)
93IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 197IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 502IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 521IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 549IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 796IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1153IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1522if (tbx is not null && tbx.GetSelectedToolboxItem((IDesignerHost)GetService(typeof(IDesignerHost))) is not null) 1621IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 1736IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 1860IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 1957IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost;
System\Windows\Forms\Design\TabOrder.cs (2)
20private IDesignerHost _host; 42public TabOrder(IDesignerHost host)
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (3)
65IDesignerHost designerHost = (IDesignerHost)_serviceProvider.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripCollectionEditor.cs (2)
56IDesignerHost? host = provider.GetService<IDesignerHost>();
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (3)
33/// The <see cref="IDesignerHost"/> that owns this designer. 35private IDesignerHost _designerHost => GetRequiredService<IDesignerHost>();
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
45private IDesignerHost _host; // get private copy of the DesignerHost 1397_host = GetRequiredService<IDesignerHost>();
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (3)
440IDesignerHost designerHost = (IDesignerHost)provider.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (3)
23private IDesignerHost _host; 341_host = (IDesignerHost)GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripEditorManager.cs (3)
24private readonly IDesignerHost _designerHost; 40_designerHost = (IDesignerHost)comp.Site.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripInSituService.cs (6)
18private readonly IDesignerHost _designerHost; 31_designerHost = (IDesignerHost)provider.GetService(typeof(IDesignerHost)); 73IDesignerHost host = (IDesignerHost)_sp.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripItemBehavior.cs (19)
77IDesignerHost designerHost = (IDesignerHost)item.Site.GetService(typeof(IDesignerHost)); 153private static Rectangle GetPaintingBounds(IDesignerHost designerHost, ToolStripItem item) 293IDesignerHost designerHost = (IDesignerHost)glyphItem.Site.GetService(typeof(IDesignerHost)); 544IDesignerHost designerHost = (IDesignerHost)glyphItem.Site.GetService(typeof(IDesignerHost)); 648IDesignerHost designerHost = (IDesignerHost)currentDropItem.Site.GetService(typeof(IDesignerHost)); 904IDesignerHost designerHost = (IDesignerHost)item.Site.GetService(typeof(IDesignerHost)); 962IDesignerHost designerHost = (IDesignerHost)glyphItem.Site.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (21)
207IDesignerHost _designerHost = (IDesignerHost)_serviceProvider.GetService(typeof(IDesignerHost)); 233IDesignerHost _designerHost = (IDesignerHost)_serviceProvider.GetService(typeof(IDesignerHost)); 304IDesignerHost _designerHost = (IDesignerHost)_serviceProvider.GetService(typeof(IDesignerHost)); 372IDesignerHost designerHost = (IDesignerHost)_serviceProvider.GetService(typeof(IDesignerHost)); 434IDesignerHost designerHost = (IDesignerHost)_serviceProvider.GetService(typeof(IDesignerHost)); 473IDesignerHost designerHost = (IDesignerHost)_serviceProvider.GetService(typeof(IDesignerHost)); 512IDesignerHost designerHost = (IDesignerHost)_serviceProvider.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripItemDesigner.cs (9)
247if (!TryGetService(out IDesignerHost designerHost)) 333IDesignerHost designerHost = GetService<IDesignerHost>(); 695if (!TryGetService(out IDesignerHost host)) 964if (TryGetService(out IDesignerHost designerHost) && currentSelection.Owner is ToolStripDropDown parentDropDown) 1034if (!TryGetService(out IDesignerHost host)) 1192IDesignerHost designerHost = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (9)
20private readonly IDesignerHost _designerHost; 62_designerHost = (IDesignerHost)_provider.GetService(typeof(IDesignerHost)); 126private IDesignerHost Host 594IDesignerHost host = Host; 836IDesignerHost host = Host; 902IDesignerHost host = Host; 1651IDesignerHost host = Host; 1742IDesignerHost host = Host;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (5)
32private IDesignerHost _designerHost; 1486_designerHost = GetService<IDesignerHost>(); 2631IDesignerHost host = (IDesignerHost)primaryItem.Site.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
22private IDesignerHost? _designerHost; 321_designerHost = component.Site?.GetService<IDesignerHost>();
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
50private readonly IDesignerHost _designerHost; 123_designerHost = component.Site.GetService<IDesignerHost>();
System.Windows.Forms.Primitives (2)
System\ServiceExtensions.cs (2)
52/// <param name="designerHost">The <see cref="IDesignerHost"/> to retrieve the service object from.</param> 58[NotNullWhen(true)] this IDesignerHost? designerHost,