114 references to TabAlignment
System.Windows.Forms (15)
System\Windows\Forms\Controls\TabControl\TabControl.cs (15)
29private TabAlignment _alignment = TabAlignment.Top; 100[DefaultValue(TabAlignment.Top)] 103public TabAlignment Alignment 118if (_alignment is TabAlignment.Left or TabAlignment.Right) 142if (_appearance == TabAppearance.FlatButtons && _alignment != TabAlignment.Top) 293if (_alignment is TabAlignment.Bottom or 294TabAlignment.Right) 299if (_alignment is TabAlignment.Left or 300TabAlignment.Right) 317if (_appearance == TabAppearance.FlatButtons && _alignment == TabAlignment.Top) 564if (!Multiline && (_alignment == TabAlignment.Left || _alignment == TabAlignment.Right)) 566_alignment = TabAlignment.Top;
System.Windows.Forms.Tests (99)
System\Windows\Forms\TabControlTests.cs (99)
23Assert.Equal(TabAlignment.Top, control.Alignment); 223[InlineData(TabAlignment.Bottom, 0x56010802)] 224[InlineData(TabAlignment.Left, 0x56010A80)] 225[InlineData(TabAlignment.Right, 0x56010A82)] 226[InlineData(TabAlignment.Top, 0x56010800)] 227public void TabControl_CreateParams_GetAlignment_ReturnsExpected(TabAlignment alignment, int expectedStyle) 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) 363yield return new object[] { true, TabAlignment.Top, true }; 364yield return new object[] { true, TabAlignment.Bottom, true }; 365yield return new object[] { true, TabAlignment.Left, true }; 366yield return new object[] { true, TabAlignment.Right, true }; 368yield return new object[] { false, TabAlignment.Top, false }; 369yield return new object[] { false, TabAlignment.Bottom, false }; 370yield return new object[] { false, TabAlignment.Left, true }; 371yield return new object[] { false, TabAlignment.Right, true }; 376public void TabControl_Alignment_Set_GetReturnsExpected(bool multiline, TabAlignment value, bool expectedMultiline) 396yield return new object[] { true, TabAlignment.Top, true, 0 }; 397yield return new object[] { true, TabAlignment.Bottom, true, 1 }; 398yield return new object[] { true, TabAlignment.Left, true, 1 }; 399yield return new object[] { true, TabAlignment.Right, true, 1 }; 401yield return new object[] { false, TabAlignment.Top, false, 0 }; 402yield return new object[] { false, TabAlignment.Bottom, false, 1 }; 403yield return new object[] { false, TabAlignment.Left, true, 1 }; 404yield return new object[] { false, TabAlignment.Right, true, 1 }; 409public void TabControl_Alignment_SetWithHandle_GetReturnsExpected(bool multiline, TabAlignment value, bool expectedMultiline, int expectedCreatedCallCount) 442[InvalidEnumData<TabAlignment>] 443public void TabControl_Alignment_SetInvalidValue_ThrowsInvalidEnumArgumentException(TabAlignment value) 450[InlineData(TabAlignment.Bottom)] 451[InlineData(TabAlignment.Left)] 452[InlineData(TabAlignment.Right)] 453public void TabControl_Appearance_GetFlatButtonsWithAlignment_ReturnsExpected(TabAlignment alignment) 464control.Alignment = TabAlignment.Top; 466Assert.Equal(TabAlignment.Top, control.Alignment); 1618yield return new object[] { TabAlignment.Bottom, true, TabAlignment.Bottom, TabAlignment.Bottom }; 1619yield return new object[] { TabAlignment.Left, true, TabAlignment.Left, TabAlignment.Top }; 1620yield return new object[] { TabAlignment.Right, true, TabAlignment.Right, TabAlignment.Top }; 1621yield return new object[] { TabAlignment.Top, true, TabAlignment.Top, TabAlignment.Top }; 1622yield return new object[] { TabAlignment.Bottom, false, TabAlignment.Bottom, TabAlignment.Bottom }; 1623yield return new object[] { TabAlignment.Left, false, TabAlignment.Top, TabAlignment.Top }; 1624yield return new object[] { TabAlignment.Right, false, TabAlignment.Top, TabAlignment.Top }; 1625yield return new object[] { TabAlignment.Top, false, TabAlignment.Top, TabAlignment.Top }; 1630public void TabControl_Multiline_Set_GetReturnsExpected(TabAlignment alignment, bool value, TabAlignment expectedAlignment1, TabAlignment expectedAlignment2) 1656yield return new object[] { TabAlignment.Bottom, true, TabAlignment.Bottom, 1, TabAlignment.Bottom }; 1657yield return new object[] { TabAlignment.Left, true, TabAlignment.Left, 0, TabAlignment.Top }; 1658yield return new object[] { TabAlignment.Right, true, TabAlignment.Right, 0, TabAlignment.Top }; 1659yield return new object[] { TabAlignment.Top, true, TabAlignment.Top, 1, TabAlignment.Top }; 1660yield return new object[] { TabAlignment.Bottom, false, TabAlignment.Bottom, 0, TabAlignment.Bottom }; 1661yield return new object[] { TabAlignment.Left, false, TabAlignment.Top, 1, TabAlignment.Top }; 1662yield return new object[] { TabAlignment.Right, false, TabAlignment.Top, 1, TabAlignment.Top }; 1663yield return new object[] { TabAlignment.Top, false, TabAlignment.Top, 0, TabAlignment.Top }; 1668public void TabControl_Multiline_SetWithHandle_GetReturnsExpected(TabAlignment alignment, bool value, TabAlignment expectedAlignment1, int expectedCreatedCallCount, TabAlignment expectedAlignment2)