110 references to GetService
System.Windows.Forms.Design (109)
System\ComponentModel\Design\ComponentDesigner.cs (2)
385if (component.Site is IServiceContainer sc && GetService(typeof(DesignerCommandSet)) is null) 560=> GetService(typeof(T)) as T;
System\Windows\Forms\Design\DocumentDesigner.cs (28)
115IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 186IMenuCommandService menuCommandService = (IMenuCommandService)GetService(typeof(IMenuCommandService)); 266IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 341IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 347ToolStripAdornerWindowService toolWindow = (ToolStripAdornerWindowService)GetService(typeof(ToolStripAdornerWindowService)); 362ISplitWindowService sws = (ISplitWindowService)GetService(typeof(ISplitWindowService)); 373IComponentChangeService cs = (IComponentChangeService)GetService(typeof(IComponentChangeService)); 389IToolboxService toolbox = (IToolboxService)GetService(typeof(IToolboxService)); 402ISelectionService ss = (ISelectionService)GetService(typeof(ISelectionService)); 424ISplitWindowService sws = (ISplitWindowService)GetService(typeof(ISplitWindowService)); 464IPropertyValueUIService pvUISvc = (IPropertyValueUIService)GetService(typeof(IPropertyValueUIService)); 589ISelectionService s = (ISelectionService)GetService(typeof(ISelectionService)); 625IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 682IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 683IExtenderProviderService exps = (IExtenderProviderService)GetService(typeof(IExtenderProviderService)); 718IComponentChangeService cs = (IComponentChangeService)GetService(typeof(IComponentChangeService)); 840if (GetService(typeof(IDesignerHost)) is IDesignerHost host) 949ISplitWindowService sws = (ISplitWindowService)GetService(typeof(ISplitWindowService)); 953IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 969IMenuCommandService mcs = (IMenuCommandService)GetService(typeof(IMenuCommandService)); 972ISelectionService selSvc = (ISelectionService)GetService(typeof(ISelectionService)); 989IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1075_undoEngine = GetService(typeof(UndoEngine)) as UndoEngine; 1111ISelectionService ss = (ISelectionService)GetService(typeof(ISelectionService)); 1179IHelpService hs = (IHelpService)GetService(typeof(IHelpService)); 1366IMenuCommandService mcs = (IMenuCommandService)GetService(typeof(IMenuCommandService)); 1376IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1387IToolboxService toolboxService = (IToolboxService)GetService(typeof(IToolboxService));
System\Windows\Forms\Design\FlowPanelDesigner.cs (1)
43SelectionManager? sm = GetService(typeof(SelectionManager)) as SelectionManager;
System\Windows\Forms\Design\FormDocumentDesigner.cs (3)
299IComponentChangeService cs = (IComponentChangeService)GetService(typeof(IComponentChangeService)); 335IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 349IComponentChangeService cs = (IComponentChangeService)GetService(typeof(IComponentChangeService));
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
89_inheritanceUI ??= (InheritanceUI)GetService(typeof(InheritanceUI));
System\Windows\Forms\Design\ParentControlDesigner.cs (30)
188IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 267IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 405IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 454IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 471ISelectionService selSvc = (ISelectionService)GetService(typeof(ISelectionService)); 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) 1285IDesignerOptionService optSvc = (IDesignerOptionService)GetService(typeof(IDesignerOptionService)); 1422IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1465IMenuCommandService ms = (IMenuCommandService)GetService(typeof(IMenuCommandService)); 1491IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1578_toolboxService ??= (IToolboxService)GetService(typeof(IToolboxService)); 1633ISelectionService sel = (ISelectionService)GetService(typeof(ISelectionService)); 1664IMenuCommandService ms = (IMenuCommandService)GetService(typeof(IMenuCommandService)); 1676IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1715_toolboxService ??= (IToolboxService)GetService(typeof(IToolboxService)); 1719_mouseDragTool = _toolboxService.GetSelectedToolboxItem((IDesignerHost)GetService(typeof(IDesignerHost))); 1732ISelectionService selsvc = (ISelectionService)GetService(typeof(ISelectionService)); 1738IEventHandlerService eventSvc = (IEventHandlerService)GetService(typeof(IEventHandlerService)); 1813IEventHandlerService eventSvc = (IEventHandlerService)GetService(typeof(IEventHandlerService)); 1883var selSvc = (ISelectionService)GetService(typeof(ISelectionService)); 2067_toolboxService ??= (IToolboxService)GetService(typeof(IToolboxService)); 2313IDesignerHost localDesignerHost = (IDesignerHost)GetService(typeof(IDesignerHost)); 2355IUIService uiSvc = (IUIService)GetService(typeof(IUIService)); 2473IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
185var uis = GetService(typeof(IUIService)) as IUIService;
System\Windows\Forms\Design\TabControlDesigner.cs (12)
131IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 146ISelectionService svc = (ISelectionService)GetService(typeof(ISelectionService)); 152IComponentChangeService cs = (IComponentChangeService)GetService(typeof(IComponentChangeService)); 217ISelectionService svc = (ISelectionService)GetService(typeof(ISelectionService)); 223IComponentChangeService cs = (IComponentChangeService)GetService(typeof(IComponentChangeService)); 242IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 313IEventHandlerService eventSvc = (IEventHandlerService)GetService(typeof(IEventHandlerService)); 337IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 400ISelectionService svc = (ISelectionService)GetService(typeof(ISelectionService)); 423SelectionManager selMgr = (SelectionManager)GetService(typeof(SelectionManager)); 435ISelectionService svc = (ISelectionService)GetService(typeof(ISelectionService)); 488IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (27)
93IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 197IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 216_undoEngine = GetService(typeof(UndoEngine)) as UndoEngine; 262DesignerActionUIService actionUIService = (DesignerActionUIService)GetService(typeof(DesignerActionUIService)); 359IUIService uis = GetService(typeof(IUIService)) as IUIService; 502IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 521IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 549IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 617ISelectionService selSvc = GetService(typeof(ISelectionService)) as ISelectionService; 625IUIService uiService = GetService(typeof(IUIService)) as IUIService; 773IUIService uiService = (IUIService)GetService(typeof(IUIService)); 785IUIService uiService = (IUIService)GetService(typeof(IUIService)); 799IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1159IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); 1472ISelectionService selSvc = GetService(typeof(ISelectionService)) as ISelectionService; 1536IToolboxService tbx = (IToolboxService)GetService(typeof(IToolboxService)); 1537if (tbx is not null && tbx.GetSelectedToolboxItem((IDesignerHost)GetService(typeof(IDesignerHost))) is not null) 1583ISelectionService selSvc = GetService(typeof(ISelectionService)) as ISelectionService; 1636IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 1703IUIService uiService = (IUIService)GetService(typeof(IUIService)); 1751IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 1780IUIService uiService = (IUIService)GetService(typeof(IUIService)); 1875IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 1942IUIService uiService = (IUIService)GetService(typeof(IUIService)); 1972IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost; 2037IUIService uiService = (IUIService)GetService(typeof(IUIService)); 2056IUIService uiService = (IUIService)GetService(typeof(IUIService));
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
397if (GetService(typeof(DesignerOptionService)) is WindowsFormsDesignerOptionService dos)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (3)
350_host = (IDesignerHost)GetService(typeof(IDesignerHost)); 353ToolStripKeyboardHandlingService keyboardHandlingService = (ToolStripKeyboardHandlingService)GetService(typeof(ToolStripKeyboardHandlingService)); 357ISupportInSituService inSituService = (ISupportInSituService)GetService(typeof(ISupportInSituService));
System.Windows.Forms.Design.Tests (1)
System\ComponentModel\Design\ComponentDesignerTests.cs (1)
2940public new object GetService(Type serviceType) => base.GetService(serviceType);