Base:
property
Site
System.ComponentModel.Component.Site
Implemented interface member:
property
Site
System.ComponentModel.IComponent.Site
3 overrides of Site
System.Windows.Forms (3)
System\Windows\Forms\ActiveX\AxHost.cs (1)
883
public override ISite?
Site
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1148
public override ISite?
Site
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
173
public override ISite?
Site
8 writes to Site
System.Windows.Forms (6)
System\Windows\Forms\ActiveX\AxHost.cs (1)
899
base.
Site
= value;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
1644
_control.
Site
= new AxSourcingSite(_control, _clientSite, "ControlAxSourcingSite");
1648
_control.
Site
= null;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1156
base.
Site
= value;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
392
ControlInternal.
Site
= value is not null
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
179
base.
Site
= value;
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1100
_dataGridViewPrivateCopy.
Site
= dataGridView.Site;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
1430
_miniToolStrip.
Site
= strip.Site;
167 references to Site
System.Windows.Forms (37)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (4)
121
string? name = control.
Site
is { } site ? site.Name : control.Name;
295
if (control.
Site
is not { } site
333
Debug.Assert(_parent.
Site
is null, "Parent is sited but we could not find IContainer");
383
=> _parent.
Site
is { } site && site.DesignMode ? site.Container : null;
System\Windows\Forms\Control.cs (10)
667
ambientProperties =
Site
is not null ?
Site
.GetService<AmbientProperties>() : GetService<AmbientProperties>();
2436
return (control.
Site
is not null && control.
Site
.DesignMode) || control.Parent is null ?
2437
control.
Site
: GetSitedParentSite(control.Parent);
2684
if (string.IsNullOrEmpty(name) &&
Site
is not null)
2686
name =
Site
.Name;
5375
Site
is { } site
11301
MarshalStringToMessage(
Site
?.Name ?? Name ?? string.Empty, ref m);
12725
ISite? site =
Site
;
System\Windows\Forms\Controls\ListView\ListView.cs (1)
6189
ISite? site =
Site
;
System\Windows\Forms\Controls\ListView\ListViewGroupItemCollection.cs (2)
24
public bool OwnerIsDesignMode => _group.ListView?.
Site
is not null && _group.ListView.
Site
.DesignMode;
System\Windows\Forms\Controls\ListView\ListViewItem.cs (2)
1166
if ((_listView.
Site
is null || !_listView.
Site
.DesignMode) && _group is not null)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1150
get => base.
Site
;
System\Windows\Forms\Controls\TabControl\TabControl.ControlCollection.cs (2)
52
ISite? site = _owner.
Site
;
55
ISite? siteTab = tabPage.
Site
;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (2)
807
if (toolStripToDrag.
Site
is not null && toolStripToDrag.
Site
.DesignMode && IsHandleCreated)
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (3)
309
if (_associatedContainer is not null || ctl.
Site
is not ISite site)
352
=> ctl.
Site
is not null ? ctl.
Site
.Name ?? string.Empty : ctl.Name ?? string.Empty;
System\Windows\Forms\Controls\WebBrowser\WebBrowserHelper.cs (1)
94
ISite? site = ctl.
Site
;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
1112
bool dt =
Site
?.DesignMode ?? false;
1113
bool parentDt = ParentInternal.
Site
?.DesignMode ?? false;
System\Windows\Forms\Layout\FlowLayout.cs (2)
311
if (container is Control flp && flp.
Site
is not null && flp.
Site
.DesignMode)
System\Windows\Forms\MDI\MDIClient.cs (5)
98
ISite? site = ParentInternal?.
Site
;
168
ISite? site = ParentInternal?.
Site
;
220
|| ParentInternal?.
Site
?.DesignMode == true)
329
if (ParentInternal is not null && ParentInternal.
Site
is not null && ParentInternal.
Site
.DesignMode && Handle != IntPtr.Zero)
System.Windows.Forms.Design (130)
System\ComponentModel\Design\ToolStripContainerActionList.cs (1)
25
_serviceProvider = _toolStripContainer.
Site
;
System\Windows\Forms\Design\BaseContextMenuStrip.cs (1)
92
if (parentControl.
Site
is not null)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (5)
80
_serviceProviderSource = source.
Site
;
223
if (c.
Site
is not null && !(c.
Site
is INestedSite) && _destHost is not null)
305
_serviceProviderTarget = dragTarget.
Site
;
637
_serviceProviderTarget = target.
Site
;
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (1)
119
_resizeTransaction = host.CreateTransaction(string.Format(SR.TableLayoutPanelRowColResize, (isColumn ? "Column" : "Row"), _designer.Control.
Site
.Name));
System\Windows\Forms\Design\CommandSet.cs (1)
1786
while (parent is not null && parent.
Site
is null)
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (6)
129
if (control.
Site
is not null && control.
Site
.DesignMode)
280
if (parent is not null && parent.
Site
is not null)
423
if (child.
Site
is null || child.
Site
.Container != control.
Site
!.Container)
System\Windows\Forms\Design\ControlCommandSet.cs (8)
300
if (obj is not Control control || control.
Site
is null)
385
if (currentSnapProp.PropertyType == typeof(bool) && c.
Site
is not null && c.
Site
.Container == container)
1403
if (nextControl is not null && nextControl.
Site
is not null)
1405
controlSiteContainer = DesignerUtils.CheckForNestedContainer(nextControl.
Site
.Container); // ...necessary to support SplitterPanel components
1408
if (nextControl is null || nextControl.
Site
is null || controlSiteContainer != container)
1455
if (ctl.
Site
is not null && ctl.
Site
.Container == ctl.Container)
System\Windows\Forms\Design\ControlDesigner.cs (2)
117
if (control.
Site
is not null)
1135
ISite? site = control.
Site
;
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollection.cs (1)
73
_realCollection[i].
Site
is not null &&
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (13)
56
if (_liveDataGridView.
Site
.TryGetService(out IUIService? uiService))
129
_liveDataGridView.
Site
?.Container?.Add(column, column.Name);
133
IUIService? uiService = _liveDataGridView.
Site
?.GetService<IUIService>();
155
IDesignerHost? host = _liveDataGridView.
Site
?.GetService<IDesignerHost>();
520
if (!_liveDataGridView.
Site
.TryGetService(out IComponentChangeService? changeService))
584
IHelpService? helpService = _liveDataGridView.
Site
?.GetService<IHelpService>();
635
if (_liveDataGridView.
Site
.TryGetService(out IDesignerHost? host))
638
nameCreationService = _liveDataGridView.
Site
.GetService<INameCreationService>();
650
IUIService? uiService = _liveDataGridView.
Site
?.GetService<IUIService>();
660
if (!_liveDataGridView.
Site
.TryGetService(out IDesignerHost? host))
770
IDesignerHost? host = _liveDataGridView.
Site
?.GetService<IDesignerHost>();
772
INameCreationService? nameCreationService = _liveDataGridView.
Site
?.GetService<INameCreationService>();
788
IUIService? uiService = _liveDataGridView.
Site
?.GetService<IUIService>();
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (11)
116
ITypeResolutionService? tr = _liveDataGridView?.
Site
?.GetService<ITypeResolutionService>();
182
IComponentChangeService? changeService = _liveDataGridView!.
Site
?.GetService<IComponentChangeService>();
184
IContainer? currentContainer = _liveDataGridView.
Site
?.Container;
280
IUIService? uiService = _liveDataGridView?.
Site
?.GetService<IUIService>();
785
IHelpService? helpService = _liveDataGridView?.
Site
?.GetService<IHelpService>();
792
IUIService? uiService = _liveDataGridView?.
Site
?.GetService<IUIService>();
870
ITypeResolutionService? tr = _liveDataGridView?.
Site
?.GetService<ITypeResolutionService>();
1087
IComponentChangeService? newComponentChangeService = dataGridView.
Site
?.GetService<IComponentChangeService>();
1100
_dataGridViewPrivateCopy.Site = dataGridView.
Site
;
1147
_propertyGrid1.Site = new DataGridViewComponentPropertyGridSite(_liveDataGridView.
Site
, _liveDataGridView);
1302
get => Owner._liveDataGridView?.
Site
;
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (5)
52
if (dataGridView is not null && dataGridView.
Site
is not null)
54
host = dataGridView.
Site
.GetService<IDesignerHost>();
55
nameCreationService = dataGridView.
Site
.GetService<INameCreationService>();
71
if (dataGridView is not null && dataGridView.
Site
is not null)
73
IUIService? uiService = dataGridView.
Site
.GetService<IUIService>();
System\Windows\Forms\Design\DataGridViewDesigner.cs (14)
41
IComponentChangeService? componentChangeService = dataGridView.
Site
?.GetService<IComponentChangeService>();
96
if (dataGridView.
Site
.TryGetService(out IComponentChangeService? ccs))
331
IContainer? currentContainer = dataGridView.
Site
?.Container;
390
IContainer? currentContainer = dataGridView.
Site
?.Container;
441
ISite? site = dataGridView.
Site
;
522
ISite? site = dataGridView.
Site
;
856
IDesignerHost? host = dataGridView.
Site
?.GetService<IDesignerHost>();
871
IComponentChangeService? changeService = dataGridView.
Site
?.GetService<IComponentChangeService>();
899
IDesignerHost? host = dataGridView.
Site
?.GetService<IDesignerHost>();
914
IComponentChangeService? changeService = dataGridView.
Site
?.GetService<IComponentChangeService>();
942
IDesignerHost? host = dataGridView.
Site
?.GetService<IDesignerHost>();
957
IComponentChangeService? changeService = dataGridView.
Site
?.GetService<IComponentChangeService>();
985
IDesignerHost? host = dataGridView.
Site
?.GetService<IDesignerHost>();
1000
IComponentChangeService? changeService = dataGridView.
Site
?.GetService<IComponentChangeService>();
System\Windows\Forms\Design\DataGridViewDesigner.DataGridViewChooseDataSourceActionList.cs (2)
47
IDesignerHost? host = dataGridView.
Site
?.GetService<IDesignerHost>();
49
IComponentChangeService? changeService = dataGridView.
Site
?.GetService<IComponentChangeService>();
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
39
if (parent.
Site
is not ISite site)
System\Windows\Forms\Design\InheritanceUI.cs (2)
70
if (child.
Site
is null)
95
if (child.
Site
is null)
System\Windows\Forms\Design\ParentControlDesigner.cs (4)
481
if (selectedControl is not null && selectedControl.
Site
is null)
879
child.
Site
is not null && child.
Site
.Container == container)
1276
ReParentControls(Control, selectedControls, string.Format(SR.ParentControlDesignerLassoShortcutRedo, Control.
Site
.Name), host);
System\Windows\Forms\Design\StyleEditorForm.cs (2)
102
var host = _tableLayoutPanel.
Site
.GetService<IDesignerHost>();
1058
var host = _tableLayoutPanel.
Site
.GetService<IDesignerHost>();
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (13)
505
trans = host.CreateTransaction(string.Format(SR.BehaviorServiceCopyControl, control.
Site
.Name));
524
trans = host.CreateTransaction(string.Format(SR.TableLayoutPanelDesignerControlsSwapped, control.
Site
.Name, existingControl.
Site
.Name));
552
trans = host.CreateTransaction(string.Format(SR.BehaviorServiceMoveControl, control.
Site
.Name));
1622
if (host is not null && Table.
Site
is not null)
1627
: SR.TableLayoutPanelDesignerAddColumnUndoUnit, Table.
Site
.Name));
1737
if (host is not null && Table.
Site
is not null)
1742
Table.
Site
.Name));
1861
if (host is not null && Table.
Site
is not null)
1865
Table.
Site
.Name));
1958
if (host is not null && Table.
Site
is not null)
1960
using DesignerTransaction t = host.CreateTransaction(string.Format(SR.TableLayoutPanelDesignerChangeSizeTypeUndoUnit, Table.
Site
.Name));
2196
_realCollection[i].
Site
is not null &&
System\Windows\Forms\Design\TabOrder.cs (2)
380
ISite? site = parent.
Site
;
445
if (control.
Site
is not ISite site || site.Container != _host)
System\Windows\Forms\Design\ToolStripActionList.cs (1)
121
DesignerActionUIService? actionUIService = (DesignerActionUIService?)_toolStrip.
Site
?.GetService(typeof(DesignerActionUIService));
System\Windows\Forms\Design\ToolStripCodeDomSerializer.cs (2)
25
if (item.Site is not null && toolStrip.
Site
is not null && item.Site.Container == toolStrip.
Site
.Container)
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
811
if (parentStrip is not null && parentStrip.
Site
is not null)
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
198
_toolStripContextMenu ??= new BaseContextMenuStrip(ToolStrip.
Site
)
956
if (addingItem.Owner.
Site
is null)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (4)
286
if (item.Owner.
Site
is not null)
298
if (parentControl.
Site
is not null)
762
if (parent.
Site
is not null)
822
if (parent.
Site
is not null)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (8)
351
if ((parentControls[c].
Site
is not null && parentControls[c].TabIndex != targetIndex) || hitCtl)
1052
if (selSvc.PrimarySelection is ToolStripDropDown dropDown && dropDown.
Site
is not null)
1390
&& parentToMoveOn.OwnerItem.Owner?.
Site
is not null
1432
&& parentToMoveOn.OwnerItem.Owner?.
Site
is not null
1694
if (!(next is Control nextControl) || nextControl.
Site
is null || nextControl.
Site
.Container != container)
1965
if (ctl.
Site
is not null && ctl.
Site
.Container == container && !(ctl is ToolStripPanel))
System\Windows\Forms\Design\ToolStripMenuItemCodeDomSerializer.cs (1)
40
if (parent is not null && parent.
Site
is null)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (11)
234
if (mainStrip is not null && mainStrip.
Site
is not null && !(mainStrip is ContextMenuStrip))
713
if (MenuItem.DropDown.
Site
is null)
1130
if (ddi.DropDown.
Site
is not null || ddi.DropDownItems.Count == 1)
1554
if (MenuItem.DropDown.
Site
is not null)
1646
if (IsOnContextMenu && MenuItem.DropDown.
Site
is not null)
1665
if (IsOnContextMenu && MenuItem.DropDown.
Site
is not null)
1683
if (IsOnContextMenu && MenuItem.DropDown.
Site
is not null)
1694
if (IsOnContextMenu && MenuItem.DropDown.
Site
is not null)
1711
if (IsOnContextMenu && MenuItem.DropDown.
Site
is not null)
1723
if (IsOnContextMenu && MenuItem.DropDown.
Site
is not null)
1749
if (IsOnContextMenu && MenuItem.DropDown.
Site
is not null)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
1430
_miniToolStrip.Site = strip.
Site
;
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (4)
120
if (TreeView is not null && TreeView.
Site
is not null)
122
IDictionaryService dictionaryService = (IDictionaryService)TreeView.
Site
.GetService(typeof(IDictionaryService));
144
if (TreeView is not null && TreeView.
Site
is not null)
146
TreeView.
Site
.TryGetService(out IDictionaryService dictionaryService);