161 references to ToolStripRenderMode
System.Windows.Forms (36)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
35RenderMode = ToolStripRenderMode.ManagerRenderMode;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (12)
1504if (RenderMode == ToolStripRenderMode.ManagerRenderMode) 1544public ToolStripRenderMode RenderMode 1550return ToolStripRenderMode.ManagerRenderMode; 1555return ToolStripRenderMode.Custom; 1561? ToolStripRenderMode.Professional 1563? ToolStripRenderMode.System 1564: ToolStripRenderMode.Custom; 1570if (value == ToolStripRenderMode.Custom) 1575if (value == ToolStripRenderMode.ManagerRenderMode) 4020RenderMode = ToolStripRenderMode.ManagerRenderMode; 4474return (RenderMode is not ToolStripRenderMode.ManagerRenderMode and not ToolStripRenderMode.Custom);
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanel.cs (2)
248_rendererSwitcher = new ToolStripRendererSwitcher(this, ToolStripRenderMode.System); 273public ToolStripRenderMode RenderMode
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (3)
573internal static ToolStripRenderer CreateRenderer(ToolStripRenderMode renderMode) 577ToolStripRenderMode.System => new ToolStripSystemRenderer(isDefault: true), 578ToolStripRenderMode.Professional => new ToolStripProfessionalRenderer(isDefault: true),
System\Windows\Forms\Controls\ToolStrips\ToolStripManagerRenderMode.cs (3)
11Custom = ToolStripRenderMode.Custom, 12System = ToolStripRenderMode.System, 13Professional = ToolStripRenderMode.Professional
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (1)
244public ToolStripRenderMode RenderMode
System\Windows\Forms\Controls\ToolStrips\ToolStripRendererSwitcher.cs (13)
19private readonly ToolStripRenderMode _defaultRenderMode = ToolStripRenderMode.ManagerRenderMode; 21public ToolStripRendererSwitcher(Control owner, ToolStripRenderMode defaultRenderMode) : this(owner) 43if (RenderMode == ToolStripRenderMode.ManagerRenderMode) 74public ToolStripRenderMode RenderMode 80return ToolStripRenderMode.ManagerRenderMode; 85return ToolStripRenderMode.Custom; 92return ToolStripRenderMode.Professional; 97return ToolStripRenderMode.System; 100return ToolStripRenderMode.Custom; 106if (value == ToolStripRenderMode.Custom) 111if (value == ToolStripRenderMode.ManagerRenderMode) 177return RenderMode != _defaultRenderMode && RenderMode != ToolStripRenderMode.Custom;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
956menu.RenderMode = ToolStripRenderMode.System;
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\ContextMenuStripActionList.cs (2)
80public ToolStripRenderMode RenderMode 82get => (ToolStripRenderMode)GetProperty(nameof(RenderMode))!;
System\Windows\Forms\Design\ToolStripActionList.cs (2)
94public ToolStripRenderMode RenderMode 96get => (ToolStripRenderMode)GetProperty(nameof(RenderMode))!;
System.Windows.Forms.Design.Tests (6)
System\Windows\Forms\Design\ContextMenuStripActionListTests.cs (3)
95[EnumData<ToolStripRenderMode>] 96public void RenderMode_GetSet_ReturnsExpected(ToolStripRenderMode renderMode) 98if (renderMode == ToolStripRenderMode.Custom)
System\Windows\Forms\Design\ToolStripActionListTests.cs (3)
81[EnumData<ToolStripRenderMode>] 82public void RenderMode_GetSet_ReturnsExpected(ToolStripRenderMode renderMode) 84if (renderMode == ToolStripRenderMode.Custom)
System.Windows.Forms.Tests (115)
System\Windows\Forms\MdiControlStripTests.cs (1)
128Assert.Equal(ToolStripRenderMode.ManagerRenderMode, mdiControlStrip.RenderMode);
System\Windows\Forms\MenuStripTests.cs (1)
126Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode);
System\Windows\Forms\StatusStripTests.cs (33)
126Assert.True(control.RenderMode is ToolStripRenderMode.System or ToolStripRenderMode.ManagerRenderMode); 467[InlineData(ToolStripRenderMode.Professional, typeof(ToolStripProfessionalRenderer), 3)] 468[InlineData(ToolStripRenderMode.ManagerRenderMode, typeof(ToolStripProfessionalRenderer), 2)] 469public void StatusStrip_RenderMode_Set_ReturnsExpected(ToolStripRenderMode value, Type expectedRendererType, int expectedSameRendererChangedCallCount) 481control.RenderMode = ToolStripRenderMode.System; 482Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 501control.RenderMode = ToolStripRenderMode.System; 502Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 510[InlineData(ToolStripRenderMode.Professional, typeof(ToolStripProfessionalRenderer), 2)] 511[InlineData(ToolStripRenderMode.ManagerRenderMode, typeof(ToolStripProfessionalRenderer), 1)] 512public void StatusStrip_RenderMode_SetWithCustomRenderer_ReturnsExpected(ToolStripRenderMode value, Type expectedRendererType, int expectedSameRendererChangedCallCount) 538control.RenderMode = ToolStripRenderMode.System; 539Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 553control.RenderMode = ToolStripRenderMode.Professional; 554Assert.Equal(ToolStripRenderMode.Professional, control.RenderMode); 557control.RenderMode = ToolStripRenderMode.System; 558Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 562Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 565control.RenderMode = ToolStripRenderMode.ManagerRenderMode; 566Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 570Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 581control.RenderMode = ToolStripRenderMode.Professional; 582Assert.Equal(ToolStripRenderMode.Professional, control.RenderMode); 585control.RenderMode = ToolStripRenderMode.System; 586Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 590Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 593control.RenderMode = ToolStripRenderMode.ManagerRenderMode; 594Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 598Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 603[InvalidEnumData<ToolStripRenderMode>] 604public void StatusStrip_RenderMode_SetInvalidValue_ThrowsInvalidEnumArgumentException(ToolStripRenderMode value) 614Assert.Throws<NotSupportedException>(() => control.RenderMode = ToolStripRenderMode.Custom);
System\Windows\Forms\ToolStripContentPanelTests.cs (43)
102Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 1152Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 1159Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 1168Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 1192Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 1202Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 1214Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 1284[InlineData(ToolStripRenderMode.ManagerRenderMode, typeof(ToolStripProfessionalRenderer), 3)] 1285[InlineData(ToolStripRenderMode.Professional, typeof(ToolStripProfessionalRenderer), 4)] 1286[InlineData(ToolStripRenderMode.System, typeof(ToolStripSystemRenderer), 4)] 1287public void ToolStripContentPanel_RenderMode_Set_ReturnsExpected(ToolStripRenderMode value, Type expectedRendererType, int expectedSetSameCallCount) 1299control.RenderMode = ToolStripRenderMode.System; 1300Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 1323[InlineData(ToolStripRenderMode.Professional, typeof(ToolStripProfessionalRenderer))] 1324[InlineData(ToolStripRenderMode.System, typeof(ToolStripSystemRenderer))] 1325public void ToolStripContentPanel_RenderMode_SetWithCustomRenderer_ReturnsExpected(ToolStripRenderMode value, Type expectedRendererType) 1353control.RenderMode = ToolStripRenderMode.ManagerRenderMode; 1354Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 1363[InlineData(ToolStripRenderMode.ManagerRenderMode, typeof(ToolStripProfessionalRenderer), 3)] 1364[InlineData(ToolStripRenderMode.Professional, typeof(ToolStripProfessionalRenderer), 4)] 1365[InlineData(ToolStripRenderMode.System, typeof(ToolStripSystemRenderer), 4)] 1366public void ToolStripContentPanel_RenderMode_SetWithHandle_ReturnsExpected(ToolStripRenderMode value, Type expectedRendererType, int expectedSetSameCallCount) 1385control.RenderMode = ToolStripRenderMode.System; 1386Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 1418[InvalidEnumData<ToolStripRenderMode>] 1419public void ToolStripContentPanel_RenderMode_SetInvalidValue_ThrowsInvalidEnumArgumentException(ToolStripRenderMode value) 1429Assert.Throws<NotSupportedException>(() => control.RenderMode = ToolStripRenderMode.Custom); 1439item.RenderMode = ToolStripRenderMode.Professional; 1440Assert.Equal(ToolStripRenderMode.Professional, item.RenderMode); 1443item.RenderMode = ToolStripRenderMode.System; 1444Assert.Equal(ToolStripRenderMode.System, item.RenderMode); 1448Assert.Equal(ToolStripRenderMode.Custom, item.RenderMode); 1451item.RenderMode = ToolStripRenderMode.ManagerRenderMode; 1452Assert.Equal(ToolStripRenderMode.ManagerRenderMode, item.RenderMode); 1456Assert.Equal(ToolStripRenderMode.System, item.RenderMode); 1467item.RenderMode = ToolStripRenderMode.Professional; 1468Assert.Equal(ToolStripRenderMode.Professional, item.RenderMode); 1471item.RenderMode = ToolStripRenderMode.System; 1472Assert.Equal(ToolStripRenderMode.System, item.RenderMode); 1476Assert.Equal(ToolStripRenderMode.Custom, item.RenderMode); 1479item.RenderMode = ToolStripRenderMode.ManagerRenderMode; 1480Assert.Equal(ToolStripRenderMode.ManagerRenderMode, item.RenderMode); 1484Assert.Equal(ToolStripRenderMode.System, item.RenderMode);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
134Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode);
System\Windows\Forms\ToolStripTests.cs (36)
142Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 297Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 3235Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 3240Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 3247Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 3293[InlineData(ToolStripRenderMode.Professional, typeof(ToolStripProfessionalRenderer))] 3294[InlineData(ToolStripRenderMode.System, typeof(ToolStripSystemRenderer))] 3295public void ToolStrip_RenderMode_Set_ReturnsExpected(ToolStripRenderMode value, Type expectedRendererType) 3307control.RenderMode = ToolStripRenderMode.ManagerRenderMode; 3308Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 3327control.RenderMode = ToolStripRenderMode.ManagerRenderMode; 3328Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 3336[InlineData(ToolStripRenderMode.Professional, typeof(ToolStripProfessionalRenderer))] 3337[InlineData(ToolStripRenderMode.System, typeof(ToolStripSystemRenderer))] 3338public void ToolStrip_RenderMode_SetWithCustomRenderer_ReturnsExpected(ToolStripRenderMode value, Type expectedRendererType) 3364control.RenderMode = ToolStripRenderMode.ManagerRenderMode; 3365Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 3379control.RenderMode = ToolStripRenderMode.Professional; 3380Assert.Equal(ToolStripRenderMode.Professional, control.RenderMode); 3383control.RenderMode = ToolStripRenderMode.System; 3384Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 3388Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 3391control.RenderMode = ToolStripRenderMode.ManagerRenderMode; 3392Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 3396Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 3407control.RenderMode = ToolStripRenderMode.Professional; 3408Assert.Equal(ToolStripRenderMode.Professional, control.RenderMode); 3411control.RenderMode = ToolStripRenderMode.System; 3412Assert.Equal(ToolStripRenderMode.System, control.RenderMode); 3416Assert.Equal(ToolStripRenderMode.Custom, control.RenderMode); 3419control.RenderMode = ToolStripRenderMode.ManagerRenderMode; 3420Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 3424Assert.Equal(ToolStripRenderMode.ManagerRenderMode, control.RenderMode); 3429[InvalidEnumData<ToolStripRenderMode>] 3430public void ToolStrip_RenderMode_SetInvalidValue_ThrowsInvalidEnumArgumentException(ToolStripRenderMode value) 3440Assert.Throws<NotSupportedException>(() => control.RenderMode = ToolStripRenderMode.Custom);