10 implementations of Name
System.ComponentModel.TypeConverter (2)
System\ComponentModel\Container.cs (1)
276public string? Name
System\ComponentModel\NestedContainer.cs (1)
161public string? Name
System.Windows.Forms (2)
System\Windows\Forms\ActiveX\Control.AxSourcingSite.cs (1)
61public string? Name
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
50string? ISite.Name
System.Windows.Forms.Design (3)
System\ComponentModel\Design\CollectionEditor.PropertyGridSite.cs (1)
25public string? Name
System\ComponentModel\Design\DesignerHost.Site.cs (1)
220string? ISite.Name
System\Windows\Forms\Design\DataGridViewComponentPropertyGridSite.cs (1)
37public string? Name { get; set; }
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (1)
175public string? Name { get; set; }
System.Windows.Forms.Tests (2)
System\Windows\Forms\AccessibleObjects\PropertyGrid.PropertyGridAccessibleObjectTests.cs (1)
216public string Name { get; set; }
System\Windows\Forms\PropertyGridTests.cs (1)
4273public string Name { get; set; }
26 writes to Name
System.Windows.Forms (2)
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (1)
289Site.Name = value;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
59_owner.Site.Name = value;
System.Windows.Forms.Design (5)
System\ComponentModel\Design\DesignerHost.cs (1)
212existingSite.Name = name;
System\ComponentModel\Design\UndoEngine.UndoUnit.RenameUndoEvent.cs (1)
33comp.Site!.Name = _before;
System\Windows\Forms\Design\ControlDesigner.cs (1)
167Component.Site.Name = value;
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (1)
85Component.Site.Name = value;
System\Windows\Forms\Design\DesignerExtenders.NameExtenderProvider.cs (1)
96site.Name = newName;
System.Windows.Forms.Design.Tests (13)
System\ComponentModel\Design\DesignerHostTests.cs (13)
1268component.Site.Name = value; 1273component.Site.Name = value; 1285component.Site.Name = "NAME"; 1289component.Site.Name = "NAME"; 1306component1.Site.Name = value; 1310component1.Site.Name = value; 1360component.Site.Name = value; 1387component.Site.Name = value; 1392component.Site.Name = value; 1398component.Site.Name = "name"; 1438component.Site.Name = value; 1452Assert.Throws<InvalidOperationException>(() => component1.Site.Name = "name2"); 1453Assert.Throws<InvalidOperationException>(() => component1.Site.Name = "NAME2");
System.Windows.Forms.Tests (6)
System\Windows\Forms\ToolStripControlHostTests.cs (6)
1892.SetupSet(s => s.Name = value) 1899c.Site.Name = value; 1902mockSite.VerifySet(s => s.Name = value, Times.Once()); 1906c.Site.Name = value; 1909mockSite.VerifySet(s => s.Name = value, Times.Exactly(2)); 1931oldSite.Name = "name";
267 references to Name
DesignSurfaceExt (1)
NameCreationServiceImp.cs (1)
32string name = comp.Site.Name;
System.ComponentModel.Primitives (3)
System\ComponentModel\Component.cs (1)
130return s.Name + " [" + GetType().FullName + "]";
System\ComponentModel\ComponentCollection.cs (2)
25if (comp != null && comp.Site != null && comp.Site.Name != null && string.Equals(comp.Site.Name, name, StringComparison.OrdinalIgnoreCase))
System.ComponentModel.TypeConverter (10)
System\ComponentModel\Container.cs (2)
230if (s?.Name != null && string.Equals(s.Name, name, StringComparison.OrdinalIgnoreCase) && s.Component != component)
System\ComponentModel\ExtendedPropertyDescriptor.cs (1)
99string? providerName = site?.Name;
System\ComponentModel\MarshalByValueComponent.cs (1)
165return s.Name + " [" + GetType().FullName + "]";
System\ComponentModel\NestedContainer.cs (1)
53ownerName = Owner.Site.Name;
System\ComponentModel\ReferenceConverter.cs (1)
104string? name = site?.Name;
System\ComponentModel\ReflectPropertyDescriptor.cs (2)
926if (site?.Name != null) 928name = site.Name;
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (1)
167return (nestedSite?.FullName) ?? site.Name;
System\ComponentModel\TypeDescriptor.cs (1)
1282name = component.Site.Name;
System.Windows.Forms (11)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
121string? name = control.Site is { } site ? site.Name : control.Name;
System\Windows\Forms\Control.cs (2)
2599name = Site.Name; 11193MarshalStringToMessage(Site?.Name ?? Name ?? string.Empty, ref m);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (2)
639if (Site is not null && !string.IsNullOrEmpty(Site.Name)) 641_name = Site.Name;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
846string componentName = component.Site?.Name ?? component.GetType().Name;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
168return component.Site?.Name ?? Target.GetType().Name;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
52get => _owner.Site?.Name;
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
355=> ctl.Site is not null ? ctl.Site.Name ?? string.Empty : ctl.Name ?? string.Empty;
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
226caption = string.Format(SR.ComponentEditorFormProperties, site.Name);
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
323return component.Site?.Name ?? string.Empty;
System.Windows.Forms.Design (64)
System\ComponentModel\Design\ComponentDesigner.cs (5)
48defaultProperty.SetValue(_component, site.Name); 187/// to <see cref="ISite.Name"/> on creation. The default is <see langword="true"/>. 506settingsKeyName = $"{rootComponent.Site!.Name}.{Component.Site.Name}"; 510settingsKeyName = Component.Site.Name;
System\ComponentModel\Design\DesignerHost.cs (4)
259_rootComponentClassName ??= component.Site!.Name; 1001string name = component.Site?.Name ?? component.GetType().Name; 1062_rootComponentClassName = _rootComponent.Site.Name; 1176if (item is IComponent component && component.Site?.Name is string name)
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (1)
215transaction = host.CreateTransaction(string.Format(SR.EventBindingServiceSetValue, site.Name, name));
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (2)
297if (!string.IsNullOrEmpty(site?.Name)) 299return site.Name;
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
721string? name = e.Component!.Site!.Name;
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersExtenderProvider.cs (1)
142string? compName = site.Name;
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (1)
82string? name = site?.Name;
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (1)
840return site is null ? null : site is INestedSite nestedSite ? nestedSite.FullName : site.Name;
System\ComponentModel\Design\SiteNestedContainer.cs (1)
149string? childName = ((ISite)this).Name;
System\ComponentModel\Design\UndoEngine.cs (1)
266componentName = site.Name;
System\ComponentModel\Design\UndoEngine.UndoUnit.AddRemoveUndoEvent.cs (1)
28_componentName = component.Site!.Name;
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (1)
40selectedNames[site.Name!] = site.Container!;
System\Windows\Forms\Design\BaseContextMenuStrip.cs (2)
277else if (!string.IsNullOrEmpty(site.Name)) 279compName = site.Name;
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\BindingNavigatorDesigner.cs (1)
107item.Name = item?.Site?.Name;
System\Windows\Forms\Design\CommandSet.cs (2)
785: host.CreateTransaction(string.Format(SR.DragDropMoveComponent, comp.Site?.Name)); 3164string? name = comp.Site?.Name;
System\Windows\Forms\Design\ComponentTray.cs (1)
1938name = site.Name;
System\Windows\Forms\Design\ControlCommandSet.cs (1)
604trans = host.CreateTransaction(string.Format(SR.DragDropSizeComponent, comp.Site.Name));
System\Windows\Forms\Design\ControlDesigner.cs (3)
160get => Component.Site?.Name; 1144textProp.SetValue(Component, site.Name); 1204textProp.SetValue(Component, site.Name);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
1134_columnsNames[col] = liveCol.Site.Name; 1187if (s is not null && s.Name is not null && string.Equals(s.Name, siteName, StringComparison.OrdinalIgnoreCase) && s.Component != component)
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (1)
27return col.Site is not null ? col.Site.Name : col.Name;
System\Windows\Forms\Design\DesignBindingPicker.cs (4)
531_instancesNode = new InstancesNode(_designerHost?.RootComponent.Site.Name); 683DataSourceNode dataSourceNode = new(this, dataSource, dataSource.Site?.Name); 1377if (site is not null && !string.IsNullOrEmpty(site.Name)) 1379return site.Name;
System\Windows\Forms\Design\DesignBindingValueUIHandler.LocalUIItem.cs (1)
28name = site.Name ?? string.Empty;
System\Windows\Forms\Design\DesignerExtenders.NameExtenderProvider.cs (1)
81return site.Name;
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
749name = comp.Site?.Name;
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
621name = childSite.Name; 1276ReParentControls(Control, selectedControls, string.Format(SR.ParentControlDesignerLassoShortcutRedo, Control.Site.Name), host);
System\Windows\Forms\Design\SelectionUIService.cs (3)
269name = site.Name; 293name = site.Name; 1132trans = _host.CreateTransaction(string.Format(SR.DragDropMoveComponent, comp.Site!.Name));
System\Windows\Forms\Design\TabControlDesigner.cs (3)
250t = host.CreateTransaction(string.Format(SR.TabControlAddTab, Component.Site.Name)); 345t = host.CreateTransaction(string.Format(SR.TabControlRemoveTab, ((IComponent)tp).Site.Name, Component.Site.Name));
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (8)
505trans = host.CreateTransaction(string.Format(SR.BehaviorServiceCopyControl, control.Site.Name)); 524trans = host.CreateTransaction(string.Format(SR.TableLayoutPanelDesignerControlsSwapped, control.Site.Name, existingControl.Site.Name)); 552trans = host.CreateTransaction(string.Format(SR.BehaviorServiceMoveControl, control.Site.Name)); 1642: SR.TableLayoutPanelDesignerAddColumnUndoUnit, Table.Site.Name)); 1757Table.Site.Name)); 1880Table.Site.Name)); 1975using DesignerTransaction t = host.CreateTransaction(string.Format(SR.TableLayoutPanelDesignerChangeSizeTypeUndoUnit, Table.Site.Name));
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (4)
171ShadowProperties[SettingsKeyName] = $"{rootComponent.Site.Name}.{Component.Site.Name}"; 175ShadowProperties[SettingsKeyName] = Component.Site.Name; 394Name = Component.Site.Name
System\Windows\Forms\Design\ToolStripItemDesigner.cs (2)
682defaultValues["Text"] = site.Name; 691pd.SetValue(component, site.Name);
System.Windows.Forms.Design.Tests (99)
Mocks\MockSite.cs (1)
73.Setup(s => s.Name)
System\ComponentModel\Design\ComponentDesignerTests.cs (2)
944.Setup(s => s.Name) 2631.Setup(s => s.Name)
System\ComponentModel\Design\DesignerHostTests.cs (43)
287Assert.Equal(expectedName, component1.Site.Name); 298Assert.Equal(expectedName, component2.Site.Name); 309Assert.Equal(expectedName, component3.Site.Name); 320Assert.Equal(expectedName, component4.Site.Name); 342Assert.Equal("name1", component1.Site.Name); 353Assert.Equal("name2", component2.Site.Name); 364Assert.Empty(component3.Site.Name); 375Assert.Empty(component4.Site.Name); 430Assert.Empty(component.Site.Name); 437Assert.Empty(component.Site.Name); 444Assert.Equal("name", component.Site.Name); 500Assert.Empty(component.Site.Name); 507Assert.Empty(component.Site.Name); 514Assert.Equal("name", component.Site.Name); 598Assert.Empty(component.Site.Name); 603Assert.Empty(component.Site.Name); 608Assert.Equal("name", component.Site.Name); 638Assert.Equal("name", component.Site.Name); 642Assert.Equal("name", component.Site.Name); 693Assert.Equal("name", component.Site.Name); 697Assert.Equal("name", component.Site.Name); 728Assert.Same(name, component1.Site.Name); 735Assert.Equal("name2", component2.Site.Name); 788Assert.Equal("name1", component1.Site.Name); 799Assert.Equal("name2", component2.Site.Name); 835Assert.Equal("name1", component.Site.Name); 879Assert.Equal("name1", component.Site.Name); 1269Assert.Same(expectedName, component.Site.Name); 1274Assert.Same(expectedName, component.Site.Name); 1286Assert.Equal("NAME", component.Site.Name); 1290Assert.Equal("NAME", component.Site.Name); 1307Assert.Same(value ?? string.Empty, component1.Site.Name); 1311Assert.Same(value ?? string.Empty, component1.Site.Name); 1356Assert.Equal(oldName, component.Site.Name); 1361Assert.Equal(expectedName, component.Site.Name); 1388Assert.Same(value ?? string.Empty, component.Site.Name); 1393Assert.Same(value ?? string.Empty, component.Site.Name); 1399Assert.Equal("name", component.Site.Name); 1435Assert.Equal("oldName", component.Site.Name); 1439Assert.Equal(expectedName, component.Site.Name); 1716Assert.Empty(component.Site.Name); 1720Assert.Equal("name", component.Site.Name); 2690Assert.Empty(component.Site.Name);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (30)
22.Setup(s => s.Name) 611.Setup(s => s.Name) 789.Setup(s => s.Name) 800mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 814mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 844.Setup(s => s.Name) 859mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount)); 872mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount)); 997.Setup(s => s.Name) 1008mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 1022mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 1052.Setup(s => s.Name) 1067mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount)); 1080mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount)); 1235.Setup(s => s.Name) 1246mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 1260mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 1274mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 1306.Setup(s => s.Name) 1321mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount)); 1334mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount)); 1347mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount)); 1514.Setup(s => s.Name) 1525mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 1539mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 1553mockSite.Verify(s => s.Name, Times.Exactly(expectedCallCount)); 1585.Setup(s => s.Name) 1600mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount)); 1613mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount)); 1626mockNestedSite.Verify(s => s.Name, Times.Exactly(expectedNameCallCount));
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (1)
888.Setup(s => s.Name)
System\ComponentModel\Design\SiteNestedContainerTests.cs (21)
17.Setup(s => s.Name) 81Assert.Same(componentName, component1.Site.Name); 96Assert.Equal(componentName, component1.Site.Name); 189Assert.Null(component1.Site.Name); 200Assert.Null(component2.Site.Name); 211Assert.Null(component3.Site.Name); 222Assert.Null(component4.Site.Name); 246Assert.Equal("name1", component1.Site.Name); 257Assert.Equal("name2", component2.Site.Name); 268Assert.Empty(component3.Site.Name); 279Assert.Null(component4.Site.Name); 339Assert.Null(component.Site.Name); 346Assert.Null(component.Site.Name); 353Assert.Null(component.Site.Name); 410Assert.Null(component.Site.Name); 425Assert.Null(component.Site.Name); 436Assert.Equal("name", component.Site.Name); 440Assert.Null(component.Site.Name); 636Assert.Null(component.Site.Name); 640Assert.Null(component.Site.Name); 816Assert.Null(component.Site.Name);
TestControlDesigner.Mocks.cs (1)
105.Setup(s => s.Name)
System.Windows.Forms.Tests (78)
System\Windows\Forms\AxHostTests.cs (10)
805.Setup(s => s.Name) 853.Setup(s => s.Name) 1791.Setup(s => s.Name) 1853.Setup(s => s.Name) 1910.Setup(s => s.Name) 1965.Setup(s => s.Name) 2022.Setup(s => s.Name) 2084.Setup(s => s.Name) 2149.Setup(s => s.Name) 2223.Setup(s => s.Name)
System\Windows\Forms\ButtonBaseTests.cs (19)
562.Setup(s => s.Name) 608.Setup(s => s.Name) 654.Setup(s => s.Name) 859.Setup(s => s.Name) 950.Setup(s => s.Name) 1503.Setup(s => s.Name) 1657.Setup(s => s.Name) 2839.Setup(s => s.Name) 2951.Setup(s => s.Name) 4386.Setup(s => s.Name) 4477.Setup(s => s.Name) 5155.Setup(s => s.Name) 5259.Setup(s => s.Name) 6270.Setup(s => s.Name) 6361.Setup(s => s.Name) 6984.Setup(s => s.Name) 7088.Setup(s => s.Name) 7414.Setup(s => s.Name) 7518.Setup(s => s.Name)
System\Windows\Forms\ButtonTests.cs (2)
2414.Setup(s => s.Name) 2503.Setup(s => s.Name)
System\Windows\Forms\ColumnHeaderTests.cs (4)
761.Setup(x => x.Name) 847Assert.Equal(value, header.Site.Name); 852Assert.Equal(value, header.Site.Name); 920.Setup(s => s.Name)
System\Windows\Forms\ControlTests.Properties.cs (6)
9298.Setup(s => s.Name) 9305mockSite.Verify(s => s.Name, Times.Once()); 9309mockSite.Verify(s => s.Name, Times.Exactly(2)); 9366.Setup(s => s.Name) 9375mockSite.Verify(s => s.Name, Times.Exactly(expectedSiteCallCount)); 9380mockSite.Verify(s => s.Name, Times.Exactly(expectedSiteCallCount * 2));
System\Windows\Forms\DataGridViewElementTests.cs (1)
280.Setup(s => s.Name)
System\Windows\Forms\ToolStripControlHostTests.cs (11)
481.Setup(s => s.Name) 1781.Setup(s => s.Name) 1793Assert.Equal(name, c.Site.Name); 1803Assert.Equal(name, c.Site.Name); 1873Assert.Null(oldSite.Name); 1889.Setup(s => s.Name) 1900Assert.Equal(expected, item.Site.Name); 1901Assert.Equal(expected, c.Site.Name); 1907Assert.Equal(expected, item.Site.Name); 1908Assert.Equal(expected, c.Site.Name); 1932Assert.Null(oldSite.Name);
System\Windows\Forms\ToolStripDropDownTests.cs (2)
1221.Setup(s => s.Name) 1353.Setup(s => s.Name)
System\Windows\Forms\ToolStripItemTests.cs (17)
1151.Setup(s => s.Name) 1248.Setup(s => s.Name) 1386.Setup(s => s.Name) 2587.Setup(s => s.Name) 2673.Setup(s => s.Name) 2808.Setup(s => s.Name) 6170.Setup(s => s.Name) 6180mockSite.Verify(s => s.Name, Times.Once()); 6184mockSite.Verify(s => s.Name, Times.Exactly(2)); 6208.Setup(s => s.Name) 7690.Setup(s => s.Name) 9201.Setup(s => s.Name) 9298.Setup(s => s.Name) 9436.Setup(s => s.Name) 14862.Setup(s => s.Name) 14960.Setup(s => s.Name) 15098.Setup(s => s.Name)
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
153.Setup(s => s.Name)
System\Windows\Forms\ToolStripTests.cs (3)
1772.Setup(s => s.Name) 1903.Setup(s => s.Name) 2125.Setup(s => s.Name)
TextBoxBaseTests.cs (2)
1471.Setup(s => s.Name) 1502.Setup(s => s.Name)
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
327pe.Graphics.DrawString($"Design time \n{Control.Site?.Name} !", Control.Font, SystemBrushes.WindowText, new PointF(12, 12));