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))
715
if (
TryGetService
(out ISelectionService? sel) && sel.GetComponentSelected(Control))
957
if (
TryGetService
(out DesignerActionService? designerActionService))
1017
if (
TryGetService
(out ComponentCache? cache) && component is not null)
1026
if (
TryGetService
(out ComponentCache? cache) && component is not null)
1062
if (
TryGetService
(out IComponentChangeService? componentChangeService))
1072
if (
TryGetService
(out IComponentChangeService? componentChangeService))
1164
&&
TryGetService
(out IDesignerHost? host))
1325
if (!_ctrlSelect &&
TryGetService
(out ISelectionService? selectionService))
1416
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)
840
if (!
TryGetService
(out IDesignerHost host))
862
if (_componentTray is null &&
TryGetService
(out ISplitWindowService sws))
1109
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
(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)
1250
if (
TryGetService
(out SelectionManager selectionManager) && ToolStrip is not null && CanAddItems && ToolStrip.Visible)
1878
if (
TryGetService
(out IComponentChangeService changeService))
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (9)
223
if (
TryGetService
(out SelectionManager selectionManager))
312
if (
TryGetService
(out BehaviorService _))
314
if (_dummyToolStripGlyph is not null &&
TryGetService
(out SelectionManager selectionManager))
361
if (
TryGetService
(out _selectionService))
395
if (
TryGetService
(out _nestedContainer))
405
if (_undoEngine is null &&
TryGetService
(out _undoEngine))
424
if (
TryGetService
(out ToolStripKeyboardHandlingService keyboardHandlingService))
531
if (
TryGetService
(out SelectionManager selectionManager))
675
if (
TryGetService
(out BehaviorService behaviorService))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (19)
247
if (!
TryGetService
(out IDesignerHost designerHost))
340
&&
TryGetService
(out IUIService uiService))
458
if (
TryGetService
(out IComponentChangeService cs))
469
if (_bodyGlyph is not null &&
TryGetService
(out ToolStripAdornerWindowService toolStripAdornerWindowService)
502
if (
TryGetService
(out BehaviorService b) && ImmediateParent is not null)
520
if (
TryGetService
(out IComponentChangeService changeService) && parent.Site is not null)
542
if (
TryGetService
(out IComponentChangeService changeService) && parent.Site is not null)
643
if (
TryGetService
(out IComponentChangeService cs))
648
if (
TryGetService
(out _selectionService))
701
if (!
TryGetService
(out IDesignerHost host))
741
if (!
TryGetService
(out ComponentSerializationService serializationService))
766
if (
TryGetService
(out IComponentChangeService changeService))
902
&&
TryGetService
(out BehaviorService behaviorService))
970
if (
TryGetService
(out IDesignerHost designerHost) && currentSelection.Owner is ToolStripDropDown parentDropDown)
1004
if (
TryGetService
(out BehaviorService behaviorService))
1040
if (!
TryGetService
(out IDesignerHost host))
1112
if (
TryGetService
(out ToolStripKeyboardHandlingService keyboardHandlingService))
1289
if (!
TryGetService
(out ToolStripKeyboardHandlingService keyboardService))
1297
if (
TryGetService
(out BehaviorService behaviorService))
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (4)
138
if (
TryGetService
(out ComponentSerializationService serializationService))
178
if (
TryGetService
(out ComponentSerializationService serializationService))
1482
if (
TryGetService
(out _selectionService))
1503
if (_undoEngine is null &&
TryGetService
(out _undoEngine))
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
428
if (
TryGetService
(out IMenuCommandService? menuCommandService))
445
if (
TryGetService
(out IMenuCommandService? menuCommandService))