Skip to content

MaterialDesign WPF TabControl Header #3180

Closed Answered by nicolaihenriksen
ProgramistaZaDyszke asked this question in Q&A
Discussion options

You must be logged in to vote

@ProgramistaZaDyszke I had a look at the templates. I think you're being hit by the default padding applied to the TabItem. If you explicitly override that (ideally via a style), you can also get "shorter tabs". In the example below I have explicitly set Height=20 and Padding=0 just to showcase this.

<materialDesign:Card>
  <TabControl materialDesign:ColorZoneAssist.Mode="PrimaryMid" Style="{StaticResource MaterialDesignFilledTabControl}">
    <TabItem Header="TAB 1" Height="20" Padding="0">
      <TextBlock Margin="2" Text="PrimaryMid Tab 1" />
    </TabItem>
    <TabItem Header="TAB 2" Height="20" Padding="0">
      <TextBlock Margin="2" Text="PrimaryMid Tab 2" />
    </TabItem>
  </Tab…

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@nicolaihenriksen
Comment options

Comment options

You must be logged in to vote
2 replies
@ProgramistaZaDyszke
Comment options

@nicolaihenriksen
Comment options

Answer selected by ProgramistaZaDyszke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants