91 references to TabAppearance
System.Windows.Forms (11)
System\Windows\Forms\Controls\TabControl\TabControl.cs (9)
35private TabAppearance _appearance = TabAppearance.Normal; 136[DefaultValue(TabAppearance.Normal)] 138public TabAppearance Appearance 142if (_appearance == TabAppearance.FlatButtons && _alignment != TabAlignment.Top) 144return TabAppearance.Buttons; 310if (_appearance == TabAppearance.Normal) 317if (_appearance == TabAppearance.FlatButtons && _alignment == TabAlignment.Top) 1152if (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)
31yield return new object[] { TabAppearance.Buttons }; 32yield return new object[] { TabAppearance.FlatButtons }; 33yield return new object[] { TabAppearance.Normal }; 38public void TabControlControlCollection_Add_InvokeValueWithoutHandleOwnerWithoutHandle_Success(TabAppearance appearance) 149yield return new object[] { TabAppearance.Buttons, Size.Empty, 0 }; 150yield return new object[] { TabAppearance.FlatButtons, Size.Empty, 1 }; 151yield return new object[] { TabAppearance.Normal, Size.Empty, 0 }; 153yield return new object[] { TabAppearance.Buttons, new Size(100, 120), 0 }; 154yield return new object[] { TabAppearance.FlatButtons, new Size(100, 120), 1 }; 155yield return new object[] { TabAppearance.Normal, new Size(100, 120), 0 }; 160public void TabControlControlCollection_Add_InvokeValueWithoutHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount) 321public void TabControlControlCollection_Add_InvokeValueWithHandleOwnerWithoutHandle_Success(TabAppearance appearance) 461public void TabControlControlCollection_Add_InvokeValueWithHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount)
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (19)
16yield return new object[] { TabAppearance.Buttons }; 17yield return new object[] { TabAppearance.FlatButtons }; 18yield return new object[] { TabAppearance.Normal }; 23public void TabPageCollection_Add_InvokeValueWithoutHandleOwnerWithoutHandle_Success(TabAppearance appearance) 137yield return new object[] { TabAppearance.Buttons, Size.Empty, 0 }; 138yield return new object[] { TabAppearance.FlatButtons, Size.Empty, 1 }; 139yield return new object[] { TabAppearance.Normal, Size.Empty, 0 }; 141yield return new object[] { TabAppearance.Buttons, new Size(100, 120), 0 }; 142yield return new object[] { TabAppearance.FlatButtons, new Size(100, 120), 1 }; 143yield return new object[] { TabAppearance.Normal, new Size(100, 120), 0 }; 148public void TabPageCollection_Add_InvokeValueWithoutHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount) 312public void TabPageCollection_Add_InvokeValueWithHandleOwnerWithoutHandle_Success(TabAppearance appearance) 455public void TabPageCollection_Add_InvokeValueWithHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount) 970public void TabPageCollection_IListAdd_InvokeValueWithoutHandleOwnerWithoutHandle_Success(TabAppearance appearance) 1965public void TabPageCollection_Insert_InvokeValueWithoutHandleOwnerWithoutHandle_Success(TabAppearance appearance) 2085public void TabPageCollection_Insert_InvokeValueWithoutHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount) 2255public void TabPageCollection_Insert_InvokeValueWithHandleOwnerWithoutHandle_Success(TabAppearance appearance) 2404public void TabPageCollection_Insert_InvokeValueWithHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount) 3010public void TabPageCollection_IListInsert_InvokeValueWithoutHandleOwnerWithoutHandle_Success(TabAppearance appearance)
System\Windows\Forms\TabControlTests.cs (25)
25Assert.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)] 285public void TabControl_CreateParams_GetAppearance_ReturnsExpected(TabAppearance appearance, TabAlignment alignment, int expectedStyle) 457Appearance = TabAppearance.FlatButtons, 460Assert.Equal(TabAppearance.Buttons, control.Appearance); 465Assert.Equal(TabAppearance.FlatButtons, control.Appearance); 471[EnumData<TabAppearance>] 472public void TabControl_Appearance_Set_GetReturnsExpected(TabAppearance value) 488[InlineData(TabAppearance.Normal, 0)] 489[InlineData(TabAppearance.Buttons, 1)] 490[InlineData(TabAppearance.FlatButtons, 1)] 491public void TabControl_Appearance_SetWithHandle_GetReturnsExpected(TabAppearance value, int expectedCreatedCallCount) 519[InvalidEnumData<TabAppearance>] 520public 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)] 564public static void TabPage_BackColor_GetWithParent_ReturnsExpected(bool useVisualStyleBackColor, TabAppearance parentAppearance) 589Appearance = TabAppearance.Normal 609yield return new object[] { true, TabAppearance.Buttons, Control.DefaultBackColor }; 610yield return new object[] { true, TabAppearance.FlatButtons, Control.DefaultBackColor }; 611yield return new object[] { true, TabAppearance.Normal, Color.Transparent }; 612yield return new object[] { false, TabAppearance.Buttons, Control.DefaultBackColor }; 613yield return new object[] { false, TabAppearance.FlatButtons, Control.DefaultBackColor }; 614yield return new object[] { false, TabAppearance.Normal, Control.DefaultBackColor }; 619public static void TabPage_BackColor_GetVisualStylesWithParent_ReturnsExpected(bool useVisualStyleBackColorParam, TabAppearance parentAppearanceParam, Color expectedParam) 625TabAppearance parentAppearance = (TabAppearance)Enum.Parse(typeof(TabAppearance), parentAppearanceString); 4008foreach (TabAppearance appearance in Enum.GetValues(typeof(TabAppearance))) 4044public void TabPage_OnPaintBackground_InvokeWithParent_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 4147foreach (TabAppearance appearance in Enum.GetValues(typeof(TabAppearance))) 4183public void TabPage_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)