91 references to TabAppearance
System.Windows.Forms (11)
System\Windows\Forms\Controls\TabControl\TabControl.cs (9)
35
private
TabAppearance
_appearance =
TabAppearance
.Normal;
136
[DefaultValue(
TabAppearance
.Normal)]
138
public
TabAppearance
Appearance
142
if (_appearance ==
TabAppearance
.FlatButtons && _alignment != TabAlignment.Top)
144
return
TabAppearance
.Buttons;
310
if (_appearance ==
TabAppearance
.Normal)
317
if (_appearance ==
TabAppearance
.FlatButtons && _alignment == TabAlignment.Top)
1152
if (Appearance ==
TabAppearance
.FlatButtons)
System\Windows\Forms\Controls\TabControl\TabPage.cs (2)
111
&& (ParentInternal is TabControl parent && parent.Appearance ==
TabAppearance
.Normal))
603
&& (ParentInternal is TabControl parent && parent.Appearance ==
TabAppearance
.Normal))
System.Windows.Forms.Tests (80)
System\Windows\Forms\TabControl.ControlCollectionTests.cs (13)
33
yield return new object[] {
TabAppearance
.Buttons };
34
yield return new object[] {
TabAppearance
.FlatButtons };
35
yield return new object[] {
TabAppearance
.Normal };
40
public void TabControlControlCollection_Add_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
151
yield return new object[] {
TabAppearance
.Buttons, Size.Empty, 0 };
152
yield return new object[] {
TabAppearance
.FlatButtons, Size.Empty, 1 };
153
yield return new object[] {
TabAppearance
.Normal, Size.Empty, 0 };
155
yield return new object[] {
TabAppearance
.Buttons, new Size(100, 120), 0 };
156
yield return new object[] {
TabAppearance
.FlatButtons, new Size(100, 120), 1 };
157
yield return new object[] {
TabAppearance
.Normal, new Size(100, 120), 0 };
162
public void TabControlControlCollection_Add_InvokeValueWithoutHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
323
public void TabControlControlCollection_Add_InvokeValueWithHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
463
public void TabControlControlCollection_Add_InvokeValueWithHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (19)
18
yield return new object[] {
TabAppearance
.Buttons };
19
yield return new object[] {
TabAppearance
.FlatButtons };
20
yield return new object[] {
TabAppearance
.Normal };
25
public void TabPageCollection_Add_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
139
yield return new object[] {
TabAppearance
.Buttons, Size.Empty, 0 };
140
yield return new object[] {
TabAppearance
.FlatButtons, Size.Empty, 1 };
141
yield return new object[] {
TabAppearance
.Normal, Size.Empty, 0 };
143
yield return new object[] {
TabAppearance
.Buttons, new Size(100, 120), 0 };
144
yield return new object[] {
TabAppearance
.FlatButtons, new Size(100, 120), 1 };
145
yield return new object[] {
TabAppearance
.Normal, new Size(100, 120), 0 };
150
public void TabPageCollection_Add_InvokeValueWithoutHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
314
public void TabPageCollection_Add_InvokeValueWithHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
457
public void TabPageCollection_Add_InvokeValueWithHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
972
public void TabPageCollection_IListAdd_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
1967
public void TabPageCollection_Insert_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
2087
public void TabPageCollection_Insert_InvokeValueWithoutHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
2257
public void TabPageCollection_Insert_InvokeValueWithHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
2406
public void TabPageCollection_Insert_InvokeValueWithHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
3012
public void TabPageCollection_IListInsert_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
System\Windows\Forms\TabControlTests.cs (25)
27
Assert.Equal(
TabAppearance
.Normal, control.Appearance);
275
[InlineData(
TabAppearance
.Normal, TabAlignment.Bottom, 0x56010802)]
276
[InlineData(
TabAppearance
.Normal, TabAlignment.Left, 0x56010A80)]
277
[InlineData(
TabAppearance
.Normal, TabAlignment.Right, 0x56010A82)]
278
[InlineData(
TabAppearance
.Normal, TabAlignment.Top, 0x56010800)]
279
[InlineData(
TabAppearance
.Buttons, TabAlignment.Bottom, 0x56010902)]
280
[InlineData(
TabAppearance
.Buttons, TabAlignment.Left, 0x56010B80)]
281
[InlineData(
TabAppearance
.Buttons, TabAlignment.Right, 0x56010B82)]
282
[InlineData(
TabAppearance
.Buttons, TabAlignment.Top, 0x56010900)]
283
[InlineData(
TabAppearance
.FlatButtons, TabAlignment.Bottom, 0x56010902)]
284
[InlineData(
TabAppearance
.FlatButtons, TabAlignment.Left, 0x56010B80)]
285
[InlineData(
TabAppearance
.FlatButtons, TabAlignment.Right, 0x56010B82)]
286
[InlineData(
TabAppearance
.FlatButtons, TabAlignment.Top, 0x56010908)]
287
public void TabControl_CreateParams_GetAppearance_ReturnsExpected(
TabAppearance
appearance, TabAlignment alignment, int expectedStyle)
459
Appearance =
TabAppearance
.FlatButtons,
462
Assert.Equal(
TabAppearance
.Buttons, control.Appearance);
467
Assert.Equal(
TabAppearance
.FlatButtons, control.Appearance);
473
[EnumData<
TabAppearance
>]
474
public void TabControl_Appearance_Set_GetReturnsExpected(
TabAppearance
value)
490
[InlineData(
TabAppearance
.Normal, 0)]
491
[InlineData(
TabAppearance
.Buttons, 1)]
492
[InlineData(
TabAppearance
.FlatButtons, 1)]
493
public void TabControl_Appearance_SetWithHandle_GetReturnsExpected(
TabAppearance
value, int expectedCreatedCallCount)
521
[InvalidEnumData<
TabAppearance
>]
522
public void TabControl_Appearance_SetInvalidValue_ThrowsInvalidEnumArgumentException(
TabAppearance
value)
System\Windows\Forms\TabPageTests.cs (23)
559
[InlineData(true,
TabAppearance
.Buttons)]
560
[InlineData(true,
TabAppearance
.FlatButtons)]
563
[InlineData(false,
TabAppearance
.Buttons)]
564
[InlineData(false,
TabAppearance
.FlatButtons)]
565
[InlineData(false,
TabAppearance
.Normal)]
566
public static void TabPage_BackColor_GetWithParent_ReturnsExpected(bool useVisualStyleBackColor,
TabAppearance
parentAppearance)
591
Appearance =
TabAppearance
.Normal
611
yield return new object[] { true,
TabAppearance
.Buttons, Control.DefaultBackColor };
612
yield return new object[] { true,
TabAppearance
.FlatButtons, Control.DefaultBackColor };
613
yield return new object[] { true,
TabAppearance
.Normal, Color.Transparent };
614
yield return new object[] { false,
TabAppearance
.Buttons, Control.DefaultBackColor };
615
yield return new object[] { false,
TabAppearance
.FlatButtons, Control.DefaultBackColor };
616
yield return new object[] { false,
TabAppearance
.Normal, Control.DefaultBackColor };
621
public static void TabPage_BackColor_GetVisualStylesWithParent_ReturnsExpected(bool useVisualStyleBackColorParam,
TabAppearance
parentAppearanceParam, Color expectedParam)
627
TabAppearance
parentAppearance = (
TabAppearance
)Enum.Parse(typeof(
TabAppearance
), parentAppearanceString);
4010
foreach (
TabAppearance
appearance in Enum.GetValues(typeof(
TabAppearance
)))
4046
public void TabPage_OnPaintBackground_InvokeWithParent_CallsPaint(
TabAppearance
appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
4149
foreach (
TabAppearance
appearance in Enum.GetValues(typeof(
TabAppearance
)))
4185
public void TabPage_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(
TabAppearance
appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)