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)
31
yield return new object[] {
TabAppearance
.Buttons };
32
yield return new object[] {
TabAppearance
.FlatButtons };
33
yield return new object[] {
TabAppearance
.Normal };
38
public void TabControlControlCollection_Add_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
149
yield return new object[] {
TabAppearance
.Buttons, Size.Empty, 0 };
150
yield return new object[] {
TabAppearance
.FlatButtons, Size.Empty, 1 };
151
yield return new object[] {
TabAppearance
.Normal, Size.Empty, 0 };
153
yield return new object[] {
TabAppearance
.Buttons, new Size(100, 120), 0 };
154
yield return new object[] {
TabAppearance
.FlatButtons, new Size(100, 120), 1 };
155
yield return new object[] {
TabAppearance
.Normal, new Size(100, 120), 0 };
160
public void TabControlControlCollection_Add_InvokeValueWithoutHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
321
public void TabControlControlCollection_Add_InvokeValueWithHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
461
public void TabControlControlCollection_Add_InvokeValueWithHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (19)
16
yield return new object[] {
TabAppearance
.Buttons };
17
yield return new object[] {
TabAppearance
.FlatButtons };
18
yield return new object[] {
TabAppearance
.Normal };
23
public void TabPageCollection_Add_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
137
yield return new object[] {
TabAppearance
.Buttons, Size.Empty, 0 };
138
yield return new object[] {
TabAppearance
.FlatButtons, Size.Empty, 1 };
139
yield return new object[] {
TabAppearance
.Normal, Size.Empty, 0 };
141
yield return new object[] {
TabAppearance
.Buttons, new Size(100, 120), 0 };
142
yield return new object[] {
TabAppearance
.FlatButtons, new Size(100, 120), 1 };
143
yield return new object[] {
TabAppearance
.Normal, new Size(100, 120), 0 };
148
public void TabPageCollection_Add_InvokeValueWithoutHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
312
public void TabPageCollection_Add_InvokeValueWithHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
455
public void TabPageCollection_Add_InvokeValueWithHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
970
public void TabPageCollection_IListAdd_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
1965
public void TabPageCollection_Insert_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
2085
public void TabPageCollection_Insert_InvokeValueWithoutHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
2255
public void TabPageCollection_Insert_InvokeValueWithHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
2404
public void TabPageCollection_Insert_InvokeValueWithHandleOwnerWithHandle_Success(
TabAppearance
appearance, Size itemSize, int expectedParentInvalidatedCallCount)
3010
public void TabPageCollection_IListInsert_InvokeValueWithoutHandleOwnerWithoutHandle_Success(
TabAppearance
appearance)
System\Windows\Forms\TabControlTests.cs (25)
25
Assert.Equal(
TabAppearance
.Normal, control.Appearance);
273
[InlineData(
TabAppearance
.Normal, TabAlignment.Bottom, 0x56010802)]
274
[InlineData(
TabAppearance
.Normal, TabAlignment.Left, 0x56010A80)]
275
[InlineData(
TabAppearance
.Normal, TabAlignment.Right, 0x56010A82)]
276
[InlineData(
TabAppearance
.Normal, TabAlignment.Top, 0x56010800)]
277
[InlineData(
TabAppearance
.Buttons, TabAlignment.Bottom, 0x56010902)]
278
[InlineData(
TabAppearance
.Buttons, TabAlignment.Left, 0x56010B80)]
279
[InlineData(
TabAppearance
.Buttons, TabAlignment.Right, 0x56010B82)]
280
[InlineData(
TabAppearance
.Buttons, TabAlignment.Top, 0x56010900)]
281
[InlineData(
TabAppearance
.FlatButtons, TabAlignment.Bottom, 0x56010902)]
282
[InlineData(
TabAppearance
.FlatButtons, TabAlignment.Left, 0x56010B80)]
283
[InlineData(
TabAppearance
.FlatButtons, TabAlignment.Right, 0x56010B82)]
284
[InlineData(
TabAppearance
.FlatButtons, TabAlignment.Top, 0x56010908)]
285
public void TabControl_CreateParams_GetAppearance_ReturnsExpected(
TabAppearance
appearance, TabAlignment alignment, int expectedStyle)
457
Appearance =
TabAppearance
.FlatButtons,
460
Assert.Equal(
TabAppearance
.Buttons, control.Appearance);
465
Assert.Equal(
TabAppearance
.FlatButtons, control.Appearance);
471
[EnumData<
TabAppearance
>]
472
public void TabControl_Appearance_Set_GetReturnsExpected(
TabAppearance
value)
488
[InlineData(
TabAppearance
.Normal, 0)]
489
[InlineData(
TabAppearance
.Buttons, 1)]
490
[InlineData(
TabAppearance
.FlatButtons, 1)]
491
public void TabControl_Appearance_SetWithHandle_GetReturnsExpected(
TabAppearance
value, int expectedCreatedCallCount)
519
[InvalidEnumData<
TabAppearance
>]
520
public void TabControl_Appearance_SetInvalidValue_ThrowsInvalidEnumArgumentException(
TabAppearance
value)
System\Windows\Forms\TabPageTests.cs (23)
557
[InlineData(true,
TabAppearance
.Buttons)]
558
[InlineData(true,
TabAppearance
.FlatButtons)]
561
[InlineData(false,
TabAppearance
.Buttons)]
562
[InlineData(false,
TabAppearance
.FlatButtons)]
563
[InlineData(false,
TabAppearance
.Normal)]
564
public static void TabPage_BackColor_GetWithParent_ReturnsExpected(bool useVisualStyleBackColor,
TabAppearance
parentAppearance)
589
Appearance =
TabAppearance
.Normal
609
yield return new object[] { true,
TabAppearance
.Buttons, Control.DefaultBackColor };
610
yield return new object[] { true,
TabAppearance
.FlatButtons, Control.DefaultBackColor };
611
yield return new object[] { true,
TabAppearance
.Normal, Color.Transparent };
612
yield return new object[] { false,
TabAppearance
.Buttons, Control.DefaultBackColor };
613
yield return new object[] { false,
TabAppearance
.FlatButtons, Control.DefaultBackColor };
614
yield return new object[] { false,
TabAppearance
.Normal, Control.DefaultBackColor };
619
public static void TabPage_BackColor_GetVisualStylesWithParent_ReturnsExpected(bool useVisualStyleBackColorParam,
TabAppearance
parentAppearanceParam, Color expectedParam)
625
TabAppearance
parentAppearance = (
TabAppearance
)Enum.Parse(typeof(
TabAppearance
), parentAppearanceString);
4008
foreach (
TabAppearance
appearance in Enum.GetValues(typeof(
TabAppearance
)))
4044
public void TabPage_OnPaintBackground_InvokeWithParent_CallsPaint(
TabAppearance
appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
4147
foreach (
TabAppearance
appearance in Enum.GetValues(typeof(
TabAppearance
)))
4183
public void TabPage_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(
TabAppearance
appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)