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

  • SEARCH
  • Home
  • 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 8035167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:13:57+00:00 2026-06-05T02:13:57+00:00

I am trying to create a user control which is basically include a Tab

  • 0

I am trying to create a user control which is basically include a Tab Item. As follows and try to add it to my tab control in another library.

//Grid.xaml in a.dll

<UserControl x:Name="Grid" x:Class="SomeClass"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <TabItem Header="Grid">
        <DataGrid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
    </TabItem>

</UserControl>

//TabView.xaml in b.dll
<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Views="clr-namespace:SomeClass;assembly=SomeAssembly" x:Class="SomeClass" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <TabControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >

        <Views:GridView/>

        <TabItem Header="This" />
        <TabItem Header="That" />


    </TabControl>
</UserControl>

My problem is that, it actually creates the tab there, but does not show the header of tab. I wonder if I am doing it right and how can I show the header?

  • 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-06-05T02:13:58+00:00Added an answer on June 5, 2026 at 2:13 am

    Your problem is that your control in a.dll is not TabItem. It is UserControl. You can either inherit it from TabItem (it`s a bad way for WPF) or use composition:

    //Grid.xaml in a.dll
    <UserControl x:Name="Grid" x:Class="SomeClass"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 mc:Ignorable="d" 
                 d:DesignHeight="300" d:DesignWidth="300">
    
        <DataGrid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
    
    </UserControl>
    
    
    //TabView.xaml in b.dll
    <UserControl
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 xmlns:Views="clr-namespace:SomeClass;assembly=SomeAssembly" x:Class="SomeClass" 
                 mc:Ignorable="d" 
                 d:DesignHeight="300" d:DesignWidth="300">
    
        <TabControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
    
            <TabItem Header="Grid">
                <Views:GridView/>
            </TabItem>
    
            <TabItem Header="This" />
            <TabItem Header="That" />
    
    
        </TabControl>
    </UserControl>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create User Control which will work like a rich button. It's
I'm trying to create a user control which will allow me to pass in
I'm trying to create a user control which has a DataSource, which can accept
I am trying to create a simple User Control (not WPF) in VS2008 which
Im trying to create a user control menu where links to a page's usercontrols
I'm trying to create a user control in WPF to represent a Go board
I am trying to create a custom user control in WPF. I want to
I've got an ASP user control which is basically using jquery UI datepicker just
I am trying to create a custom control, which behaves a bit like one
I am trying to create a Custom control specifically for my application which would

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.