TabControl Underlined TabPanel #2902

Merged
merged 12 commits into from Mar 22, 2017

Conversation

Projects
None yet
3 participants
@punker76
Member

punker76 commented Mar 21, 2017

What changed?

This PR adds a new attached property to add a new underlined type for the TabControl and MetroTabControl.

  • Add new Underlined attached property to TabControlHelper. This property controls the type of the underline type which can be TabItem or TabPanel (with TabItem).
    /// <summary>
    /// Specifies the underline position of a TabControl.
    /// </summary>
    public enum UnderlinedType
    {
        None,
        TabItems,
        SelectedTabItem,
        TabPanel
    }
  • Make IsUnderlined obsolete
  • Refactor Underline control, cause it doesn't work as expected (Bottom and Right doesn't works nicely)
  • Add new Brush attached properties to enable easy changing the underline brushes
Controls:TabControlHelper.UnderlineBrush
Controls:TabControlHelper.UnderlineSelectedBrush
Controls:TabControlHelper.UnderlineMouseOverBrush
Controls:TabControlHelper.UnderlineMouseOverSelectedBrush

mahapps_newunderline4

Closes #2895 [RFC] [Enhancement] Proposed TabControlHelper.IsUnderlined Change

punker76 added some commits Mar 21, 2017

Add new Underlined attached property
  New property to control the type of the underline which can be TabItem or TabPanel (with TabItem)
  Add Obsolete tag to IsUnderlined property.
New Underline content control
  This control can be used for underline scenarios.
Use new Underline control and Underlined property
  Use the new stuff at TabControl (TabControl) and MetroTabControl (MetroTabItem)
Improve TabControl samples
  Add combobox to handle the new underlined stuff

@punker76 punker76 added this to the 1.5.0 milestone Mar 21, 2017

@punker76 punker76 requested a review from thoemmi Mar 21, 2017

@amkuchta

This comment has been minimized.

Show comment
Hide comment
@amkuchta

amkuchta Mar 21, 2017

Contributor

Could we add one more item to the enum:

public enum UnderlinedType
{
    None,
    AllTabItems,
    SelectedTabItem,
    TabPanel
}

where SelectedTabItem performs like TabPanel but without the line all the way across the TabPanel? I can implement, if you'd like

Contributor

amkuchta commented Mar 21, 2017

Could we add one more item to the enum:

public enum UnderlinedType
{
    None,
    AllTabItems,
    SelectedTabItem,
    TabPanel
}

where SelectedTabItem performs like TabPanel but without the line all the way across the TabPanel? I can implement, if you'd like

@punker76 punker76 self-assigned this Mar 21, 2017

punker76 added some commits Mar 21, 2017

Additional Underline type
  New underline type to show only selected TabItems underlined
@amkuchta

This comment has been minimized.

Show comment
Hide comment
@amkuchta

amkuchta Mar 21, 2017

Contributor

@punker76 👍 this is gorgeous!!

Contributor

amkuchta commented Mar 21, 2017

@punker76 👍 this is gorgeous!!

@thoemmi

LGTM 👍

@amkuchta

This comment has been minimized.

Show comment
Hide comment
@amkuchta

amkuchta Mar 22, 2017

Contributor

HEAVY BREATHING

Contributor

amkuchta commented Mar 22, 2017

HEAVY BREATHING

punker76 added some commits Mar 22, 2017

New LineExtent property for Underline
  And make Underline more crystal
Bring back the column stuff
  for TabItems, makes the Underline usage a little bit better (no jumpy lines gaps)
Add brush attached properties
  New brush attached properties for easy changing the underline brush colors

@punker76 punker76 merged commit 63cf4eb into develop Mar 22, 2017

1 check passed

continuous-integration/teamcity Finished TeamCity Build MahApps.Metro PullRequest :: MahApps.Metro PullRequests : Tests passed: 62
Details
@amkuchta

This comment has been minimized.

Show comment
Hide comment
@amkuchta

amkuchta Mar 22, 2017

Contributor

@punker76 Was this designed to work with MetroAnitmatedTabControl and MetroAnimatedSingleRowTabControl? The underlines do not render on either control...

Contributor

amkuchta commented Mar 22, 2017

@punker76 Was this designed to work with MetroAnitmatedTabControl and MetroAnimatedSingleRowTabControl? The underlines do not render on either control...

@punker76

This comment has been minimized.

Show comment
Hide comment
@punker76

punker76 Mar 22, 2017

Member

@amkuchta it's coming...

Member

punker76 commented Mar 22, 2017

@amkuchta it's coming...

@amkuchta

This comment has been minimized.

Show comment
Hide comment
@amkuchta

amkuchta Mar 22, 2017

Contributor

@punker76 awesome, no rush. I just didn't know if it was supposed to work or not, and didn't want to open an issue without checking in first. These look great!

Contributor

amkuchta commented Mar 22, 2017

@punker76 awesome, no rush. I just didn't know if it was supposed to work or not, and didn't want to open an issue without checking in first. These look great!

@punker76 punker76 deleted the UnderlinedTabPanel branch Mar 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment