80 references to TryGetService
System.Windows.Forms.Design (80)
System\ComponentModel\Design\ComponentDesigner.cs (9)
97
if (
TryGetService
(out IInheritanceService? inheritanceService))
196
if (comps is not null && comps.Count > 0 &&
TryGetService
(out IDesignerHost? host))
225
if (parent is not null &&
TryGetService
(out IDesignerHost? host))
250
if (!
TryGetService
(out IEventBindingService? ebs)
251
|| !
TryGetService
(out ISelectionService? selectionService))
368
return
TryGetService
(out IDesignerHost? host) && _component == host.RootComponent;
383
bool isRoot =
TryGetService
(out IDesignerHost? host) && component == host.RootComponent;
390
if (
TryGetService
(out IComponentChangeService? cs))
456
if (
TryGetService
(out IComponentChangeService? cs))
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (3)
28
if (
TryGetService
(out IComponentChangeService? componentChangeService))
39
if (
TryGetService
(out IComponentChangeService? componentChangeService))
76
if (
TryGetService
(out IComponentChangeService? componentChangeService))
System\Windows\Forms\Design\BindingSourceDesigner.cs (2)
22
if (
TryGetService
(out IComponentChangeService? componentChangeService))
33
if (
TryGetService
(out IComponentChangeService? componentChangeService))
System\Windows\Forms\Design\ControlDesigner.cs (15)
164
if ((!
TryGetService
(out IDesignerHost? host) || (host is not null && !host.Loading))
375
return
TryGetService
(out IDesignerHost? host) && Component == host.RootComponent;
421
if (
TryGetService
(out IUIService? uis))
465
if (
TryGetService
(out IComponentChangeService? componentChangeService))
554
if (
TryGetService
(out IComponentChangeService? componentChangeService))
584
if (!
TryGetService
(out INestedContainer? nc))
700
if (
TryGetService
(out ISelectionService? sel) && sel.GetComponentSelected(Control))
942
if (
TryGetService
(out DesignerActionService? designerActionService))
1002
if (
TryGetService
(out ComponentCache? cache) && component is not null)
1011
if (
TryGetService
(out ComponentCache? cache) && component is not null)
1047
if (
TryGetService
(out IComponentChangeService? componentChangeService))
1057
if (
TryGetService
(out IComponentChangeService? componentChangeService))
1149
&&
TryGetService
(out IDesignerHost? host))
1310
if (!_ctrlSelect &&
TryGetService
(out ISelectionService? selectionService))
1401
if (
TryGetService
(out ISelectionService? selectionService) && !Component.Equals(selectionService.PrimarySelection))
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (1)
281
if (!
TryGetService
(out IDesignerHost? host))
System\Windows\Forms\Design\DocumentDesigner.cs (3)
879
if (!
TryGetService
(out IDesignerHost host))
901
if (_componentTray is null &&
TryGetService
(out ISplitWindowService sws))
1148
if (!
TryGetService
(out ISelectionService svc))
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
567
DesignerTransaction designerTransaction =
TryGetService
(out IDesignerHost host)
System\Windows\Forms\Design\FormDocumentDesigner.cs (1)
363
if (ce.Component is ToolStrip && _toolStripAdornerWindowService is null &&
TryGetService
(out IDesignerHost _))
System\Windows\Forms\Design\ListBoxDesigner.cs (2)
86
if (
TryGetService
<IComponentChangeService>(out IComponentChangeService? componentChangeService))
111
if (
TryGetService
(out IComponentChangeService? componentChangeService))
System\Windows\Forms\Design\SplitContainerDesigner.cs (4)
173
if (
TryGetService
(out ISelectionService? svc))
198
if (
TryGetService
(out SelectionManager? selMgr))
250
if (
TryGetService
(out ISelectionService? svc))
401
if (!
TryGetService
(out ISelectionService? svc))
System\Windows\Forms\Design\SplitterPanelDesigner.cs (2)
97
if (
TryGetService
(out IComponentChangeService? cs))
113
if (
TryGetService
(out IComponentChangeService? cs))
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (1)
225
if (!
TryGetService
(out SelectionManager? selectionManager))
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1267
if (
TryGetService
(out SelectionManager selectionManager) && ToolStrip is not null && CanAddItems && ToolStrip.Visible)
1856
if (
TryGetService
(out IComponentChangeService changeService))
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (9)
223
if (
TryGetService
(out SelectionManager selectionManager))
318
if (
TryGetService
(out BehaviorService _))
320
if (_dummyToolStripGlyph is not null &&
TryGetService
(out SelectionManager selectionManager))
367
if (
TryGetService
(out _selectionService))
401
if (
TryGetService
(out _nestedContainer))
411
if (_undoEngine is null &&
TryGetService
(out _undoEngine))
430
if (
TryGetService
(out ToolStripKeyboardHandlingService keyboardHandlingService))
537
if (
TryGetService
(out SelectionManager selectionManager))
681
if (
TryGetService
(out BehaviorService behaviorService))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (19)
247
if (!
TryGetService
(out IDesignerHost designerHost))
340
&&
TryGetService
(out IUIService uiService))
470
if (
TryGetService
(out IComponentChangeService cs))
481
if (_bodyGlyph is not null &&
TryGetService
(out ToolStripAdornerWindowService toolStripAdornerWindowService)
514
if (
TryGetService
(out BehaviorService b) && ImmediateParent is not null)
532
if (
TryGetService
(out IComponentChangeService changeService) && parent.Site is not null)
554
if (
TryGetService
(out IComponentChangeService changeService) && parent.Site is not null)
658
if (
TryGetService
(out IComponentChangeService cs))
663
if (
TryGetService
(out _selectionService))
716
if (!
TryGetService
(out IDesignerHost host))
756
if (!
TryGetService
(out ComponentSerializationService serializationService))
781
if (
TryGetService
(out IComponentChangeService changeService))
920
&&
TryGetService
(out BehaviorService behaviorService))
988
if (
TryGetService
(out IDesignerHost designerHost) && currentSelection.Owner is ToolStripDropDown parentDropDown)
1022
if (
TryGetService
(out BehaviorService behaviorService))
1058
if (!
TryGetService
(out IDesignerHost host))
1130
if (
TryGetService
(out ToolStripKeyboardHandlingService keyboardHandlingService))
1307
if (!
TryGetService
(out ToolStripKeyboardHandlingService keyboardService))
1315
if (
TryGetService
(out BehaviorService behaviorService))
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (4)
138
if (
TryGetService
(out ComponentSerializationService serializationService))
178
if (
TryGetService
(out ComponentSerializationService serializationService))
1512
if (
TryGetService
(out _selectionService))
1533
if (_undoEngine is null &&
TryGetService
(out _undoEngine))
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
434
if (
TryGetService
(out IMenuCommandService? menuCommandService))
451
if (
TryGetService
(out IMenuCommandService? menuCommandService))