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