Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 389145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:50:18+00:00 2026-05-12T15:50:18+00:00

The default behavior of the WPF Tabcontrol is to place the Tab Headers adjacent

  • 0

The default behavior of the WPF Tabcontrol is to place the Tab Headers adjacent to each other, without any empty space in between. What if I wanted to specify a gap between the headers? Do I have to define a control template for this? I’m relatively new to WFP and any help is appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:50:18+00:00Added an answer on May 12, 2026 at 3:50 pm

    I believe you will need to define a custom control template for the TabItem, maybe even one for the TabControl. Here is an example of a TabItem that uses a spacer for some separation.

    <Style
        x:Key="SpacedTab"
        TargetType="{x:Type TabItem}">
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="{x:Type TabItem}">
                    <Border
                        x:Name="Spacer"
                        Width="Auto"
                        Height="Auto"
                        Padding="0 0 5 0"
                        Margin="0 0 0 0"
                        BorderBrush="Transparent"
                        BorderThickness="0">
                        <Border
                            x:Name="Border"
                            MinWidth="150"
                            Width="Auto"
                            Height="30"
                            Background="Gray"
                            BorderBrush="DarkGray"
                            BorderThickness="0,0,0,0"
                            CornerRadius="6,6,0,0"
                            Cursor="Hand"
                            VerticalAlignment="Bottom">
                            <ContentPresenter
                                x:Name="ContentSite"
                                TextElement.FontSize="10pt"
                                TextElement.FontFamily="Arial"
                                TextElement.Foreground="Black"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                ContentSource="Header"
                                Margin="8,3,8,3"
                                Width="Auto"
                                Height="Auto" />
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    

    Hopefully that is a nudge in the right direction; you will still need to add that as a style resource and reference it from your TabControl -> TabItem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With the default copy/paste behavior in the WPF DataGrid, it seems to place a
Is it possible to change the default behavior of form elements in CakePHP without
I know that default WPF behavior is to render WPF controls and then on
The WPF DataGrid has a default behavior of allowing multicolumn sorts when the user
The default behavior of a WPF ContextMenu is to display it when the user
The default behavior of XML serialization (to_xml) for ActiveRecord objects will emit 'type' and
How can I override default behavior of displaying item label on the input when
Rails question. The default behavior for error validation is to fieldWithError-styled div around the
In the context of Entity Framework 4, the default behavior when adding a function
When deploying a web-role to the Windows Azure cloud, what is the default behavior

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.