10 implementations of DesignMode
System.ComponentModel.TypeConverter (2)
System\ComponentModel\Container.cs (1)
271public bool DesignMode => false;
System\ComponentModel\NestedContainer.cs (1)
127public bool DesignMode
System.Windows.Forms (2)
System\Windows\Forms\ActiveX\Control.AxSourcingSite.cs (1)
56public bool DesignMode => false;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
44bool ISite.DesignMode => _owner.Site?.DesignMode ?? false;
System.Windows.Forms.Design (3)
System\ComponentModel\Design\CollectionEditor.PropertyGridSite.cs (1)
23public bool DesignMode => false;
System\ComponentModel\Design\DesignerHost.Site.cs (1)
197bool ISite.DesignMode => true;
System\Windows\Forms\Design\DataGridViewComponentPropertyGridSite.cs (1)
32public bool DesignMode => false;
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (1)
174public bool DesignMode { get; }
System.Windows.Forms.Tests (2)
System\Windows\Forms\AccessibleObjects\PropertyGrid.PropertyGridAccessibleObjectTests.cs (1)
214public bool DesignMode => false;
System\Windows\Forms\PropertyGridTests.cs (1)
4272public bool DesignMode => false;
200 references to DesignMode
System.ComponentModel.Primitives (1)
System\ComponentModel\Component.cs (1)
115protected bool DesignMode => _site?.DesignMode ?? false;
System.ComponentModel.TypeConverter (6)
System\ComponentModel\ComponentResourceManager.cs (1)
133if (site != null && site.DesignMode)
System\ComponentModel\MarshalByValueComponent.cs (1)
153public virtual bool DesignMode => _site?.DesignMode ?? false;
System\ComponentModel\NestedContainer.cs (1)
134return owner.Site.DesignMode;
System\ComponentModel\ReflectEventDescriptor.cs (2)
190if (site != null && site.DesignMode) 471if (site != null && site.DesignMode)
System\ComponentModel\TypeDescriptor.cs (1)
650if (site != null && site.DesignMode)
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
666if (Site != null && Site.DesignMode)
System.Windows.Forms (19)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
383=> _parent.Site is { } site && site.DesignMode ? site.Container : null;
System\Windows\Forms\ActiveX\AxHost.cs (1)
2073return site is null || !site.DesignMode;
System\Windows\Forms\Control.cs (4)
2344GetSitedParentSite(this) is ISite parentSite && parentSite.DesignMode; 2349return (control.Site is not null && control.Site.DesignMode) || control.Parent is null ? 5289&& site.DesignMode 12623if (site is not null && site.DesignMode && site.TryGetService(out changeService))
System\Windows\Forms\Controls\ListView\ListViewGroupItemCollection.cs (1)
24public bool OwnerIsDesignMode => _group.ListView?.Site is not null && _group.ListView.Site.DesignMode;
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
1166if ((_listView.Site is null || !_listView.Site.DesignMode) && _group is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
44bool ISite.DesignMode => _owner.Site?.DesignMode ?? false;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (1)
807if (toolStripToDrag.Site is not null && toolStripToDrag.Site.DesignMode && IsHandleCreated)
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
204return site is not null && site.DesignMode ? site.Container : null;
System\Windows\Forms\DataBinding\Binding.cs (1)
576return comp.Site?.DesignMode ?? false;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
1119bool dt = Site?.DesignMode ?? false; 1120bool parentDt = ParentInternal.Site?.DesignMode ?? false;
System\Windows\Forms\Layout\FlowLayout.cs (1)
311if (container is Control flp && flp.Site is not null && flp.Site.DesignMode)
System\Windows\Forms\MDI\MDIClient.cs (4)
103if (site is not null && site.DesignMode) 173if (site is not null && site.DesignMode && Handle != IntPtr.Zero) 224|| ParentInternal?.Site?.DesignMode == true) 333if (ParentInternal is not null && ParentInternal.Site is not null && ParentInternal.Site.DesignMode && Handle != IntPtr.Zero)
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (1)
129if (control.Site is not null && control.Site.DesignMode)
System.Windows.Forms.Design.Tests (19)
Mocks\MockSite.cs (1)
76.Setup(s => s.DesignMode)
System\ComponentModel\Design\DesignerHostTests.cs (8)
286Assert.True(component1.Site.DesignMode); 297Assert.True(component2.Site.DesignMode); 308Assert.True(component3.Site.DesignMode); 319Assert.True(component4.Site.DesignMode); 341Assert.True(component1.Site.DesignMode); 352Assert.True(component2.Site.DesignMode); 363Assert.True(component3.Site.DesignMode); 374Assert.True(component4.Site.DesignMode);
System\ComponentModel\Design\SiteNestedContainerTests.cs (9)
79Assert.True(nestedSite.DesignMode); 188Assert.True(component1.Site.DesignMode); 199Assert.True(component2.Site.DesignMode); 210Assert.True(component3.Site.DesignMode); 221Assert.True(component4.Site.DesignMode); 245Assert.True(component1.Site.DesignMode); 256Assert.True(component2.Site.DesignMode); 267Assert.True(component3.Site.DesignMode); 278Assert.True(component4.Site.DesignMode);
TestControlDesigner.Mocks.cs (1)
108.Setup(s => s.DesignMode)
System.Windows.Forms.Tests (153)
System\Windows\Forms\AxHostTests.cs (17)
265.Setup(s => s.DesignMode) 608.Setup(s => s.DesignMode) 641.Setup(s => s.DesignMode) 672.Setup(s => s.DesignMode) 703.Setup(s => s.DesignMode) 736.Setup(s => s.DesignMode) 767.Setup(s => s.DesignMode) 802.Setup(s => s.DesignMode) 850.Setup(s => s.DesignMode) 1784.Setup(s => s.DesignMode) 1837.Setup(s => s.DesignMode) 1894.Setup(s => s.DesignMode) 1949.Setup(s => s.DesignMode) 2006.Setup(s => s.DesignMode) 2068.Setup(s => s.DesignMode) 2133.Setup(s => s.DesignMode) 2207.Setup(s => s.DesignMode)
System\Windows\Forms\ButtonBaseTests.cs (19)
559.Setup(s => s.DesignMode) 605.Setup(s => s.DesignMode) 651.Setup(s => s.DesignMode) 856.Setup(s => s.DesignMode) 947.Setup(s => s.DesignMode) 1500.Setup(s => s.DesignMode) 1654.Setup(s => s.DesignMode) 2836.Setup(s => s.DesignMode) 2948.Setup(s => s.DesignMode) 4383.Setup(s => s.DesignMode) 4474.Setup(s => s.DesignMode) 5152.Setup(s => s.DesignMode) 5256.Setup(s => s.DesignMode) 6267.Setup(s => s.DesignMode) 6358.Setup(s => s.DesignMode) 6981.Setup(s => s.DesignMode) 7085.Setup(s => s.DesignMode) 7411.Setup(s => s.DesignMode) 7515.Setup(s => s.DesignMode)
System\Windows\Forms\ButtonTests.cs (2)
2411.Setup(s => s.DesignMode) 2500.Setup(s => s.DesignMode)
System\Windows\Forms\ControlTests.Methods.cs (3)
2495.Setup(s => s.DesignMode) 2546.Setup(s => s.DesignMode) 2614.Setup(s => s.DesignMode)
System\Windows\Forms\ControlTests.Properties.cs (2)
10544.Setup(s => s.DesignMode) 10603.Setup(s => s.DesignMode)
System\Windows\Forms\DataGridViewElementTests.cs (1)
274.Setup(s => s.DesignMode)
System\Windows\Forms\MdiClientTests.cs (4)
348.Setup(s => s.DesignMode) 413.Setup(s => s.DesignMode) 840.Setup(s => s.DesignMode) 1002.Setup(s => s.DesignMode)
System\Windows\Forms\NotifyIconTests.cs (21)
262.Setup(s => s.DesignMode) 270mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 275mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 287.Setup(s => s.DesignMode) 296mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 301mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 408.Setup(s => s.DesignMode) 418mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 423mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 502.Setup(s => s.DesignMode) 510mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 515mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 520mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount + 1)); 533.Setup(s => s.DesignMode) 543mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 548mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount)); 553mockSite.Verify(s => s.DesignMode, Times.Exactly(expectedDesignModeCallCount + 1)); 859.Setup(s => s.DesignMode) 871mockSite.Verify(s => s.DesignMode, Times.Once()); 937.Setup(s => s.DesignMode) 946mockSite.Verify(s => s.DesignMode, Times.Once());
System\Windows\Forms\PanelTests.cs (1)
1080.Setup(s => s.DesignMode)
System\Windows\Forms\PictureBoxTests.cs (4)
823.Setup(s => s.DesignMode) 857.Setup(s => s.DesignMode) 2038.Setup(s => s.DesignMode) 2072.Setup(s => s.DesignMode)
System\Windows\Forms\ProgressBarTests.cs (3)
136.Setup(s => s.DesignMode) 795.Setup(s => s.DesignMode) 856.Setup(s => s.DesignMode)
System\Windows\Forms\TabControl.ControlCollectionTests.cs (2)
814.Setup(s => s.DesignMode) 1514.Setup(s => s.DesignMode)
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (8)
820.Setup(s => s.DesignMode) 2846.Setup(s => s.DesignMode) 3400.Setup(s => s.DesignMode) 3488.Setup(s => s.DesignMode) 3601.Setup(s => s.DesignMode) 3799.Setup(s => s.DesignMode) 3885.Setup(s => s.DesignMode) 4634.Setup(s => s.DesignMode)
System\Windows\Forms\TabControlTests.cs (1)
194.Setup(s => s.DesignMode)
System\Windows\Forms\TabPageTests.cs (15)
701.Setup(s => s.DesignMode) 743.Setup(s => s.DesignMode) 786.Setup(s => s.DesignMode) 1158.Setup(s => s.DesignMode) 1310.Setup(s => s.DesignMode) 1430.Setup(s => s.DesignMode) 1547.Setup(s => s.DesignMode) 1688.Setup(s => s.DesignMode) 1802.Setup(s => s.DesignMode) 2829.Setup(s => s.DesignMode) 2943.Setup(s => s.DesignMode) 3062.Setup(s => s.DesignMode) 3201.Setup(s => s.DesignMode) 3319.Setup(s => s.DesignMode) 3431.Setup(s => s.DesignMode)
System\Windows\Forms\TimerTests.cs (11)
64.Setup(s => s.DesignMode) 89.Setup(s => s.DesignMode) 97.Setup(s => s.DesignMode) 170.Setup(s => s.DesignMode) 196.Setup(s => s.DesignMode) 204.Setup(s => s.DesignMode) 251.Setup(s => s.DesignMode) 276.Setup(s => s.DesignMode) 302.Setup(s => s.DesignMode) 328.Setup(s => s.DesignMode) 362.Setup(s => s.DesignMode)
System\Windows\Forms\ToolStripControlHostTests.cs (5)
484.Setup(s => s.DesignMode) 1778.Setup(s => s.DesignMode) 1792Assert.Equal(designMode, c.Site.DesignMode); 1802Assert.Equal(designMode, c.Site.DesignMode); 1852Assert.False(oldSite.DesignMode);
System\Windows\Forms\ToolStripDropDownTests.cs (4)
1215.Setup(s => s.DesignMode) 1347.Setup(s => s.DesignMode) 3719.Setup(s => s.DesignMode) 4604.Setup(s => s.DesignMode)
System\Windows\Forms\ToolStripItemTests.cs (16)
1154.Setup(s => s.DesignMode) 1251.Setup(s => s.DesignMode) 1389.Setup(s => s.DesignMode) 2590.Setup(s => s.DesignMode) 2676.Setup(s => s.DesignMode) 2811.Setup(s => s.DesignMode) 6211.Setup(s => s.DesignMode) 7693.Setup(s => s.DesignMode) 7804.Setup(s => s.DesignMode) 9204.Setup(s => s.DesignMode) 9301.Setup(s => s.DesignMode) 9439.Setup(s => s.DesignMode) 13638.Setup(s => s.DesignMode) 14865.Setup(s => s.DesignMode) 14963.Setup(s => s.DesignMode) 15101.Setup(s => s.DesignMode)
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
156.Setup(s => s.DesignMode)
System\Windows\Forms\ToolStripTests.cs (4)
1766.Setup(s => s.DesignMode) 1897.Setup(s => s.DesignMode) 2119.Setup(s => s.DesignMode) 4250.Setup(s => s.DesignMode)
System\Windows\Forms\ToolTipTests.cs (2)
124.Setup(s => s.DesignMode) 688.Setup(s => s.DesignMode)
System\Windows\Forms\TreeViewTests.cs (3)
533.Setup(s => s.DesignMode) 572.Setup(s => s.DesignMode) 6094.Setup(s => s.DesignMode)
System\Windows\Forms\UserControlTests.cs (2)
275.Setup(s => s.DesignMode) 366.Setup(s => s.DesignMode)
TextBoxBaseTests.cs (2)
1465.Setup(s => s.DesignMode) 1496.Setup(s => s.DesignMode)