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 801485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:26:54+00:00 2026-05-14T23:26:54+00:00

I am trying to assign each button on the left its own Tab control.

  • 0

I am trying to assign each button on the left its own Tab control. That is for example, when the Intake form button is pushed, it will have its own set of tabs (its own tabcontrols)

am I supposed to place multiple tab controls on the artboard, or is there a way to programmatically change the names of the tabs, and there contents, when a button is pushed on the left?

here is the code so far:

<Window
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 x:Class="service.MainWindow"
 x:Name="Window"
 Title="MainWindow"
 Width="687" Height="480" mc:Ignorable="d">
 <Window.Resources>
  <Storyboard x:Key="OnLoaded1"/>
 </Window.Resources>
 <Window.Triggers>
  <EventTrigger RoutedEvent="FrameworkElement.Loaded">
   <BeginStoryboard Storyboard="{StaticResource OnLoaded1}"/>
  </EventTrigger>
 </Window.Triggers>

 <Grid x:Name="LayoutRoot" Margin="0,0,-16,1">
  <Grid.ColumnDefinitions>
   <ColumnDefinition Width="0*"/>
   <ColumnDefinition/>
  </Grid.ColumnDefinitions>
  <DockPanel Margin="8,8,0,7" LastChildFill="False" Grid.Column="1" HorizontalAlignment="Left" Width="660">
   <Menu VerticalAlignment="Top" Width="657" Height="32">
    <MenuItem x:Name="file" Header="File"/>
    <MenuItem x:Name="edit" Header="Edit">
     <MenuItem Width="100" Height="100" Header="MenuItem"/>
    </MenuItem>
    <MenuItem x:Name="view" Header="View"/>
    <MenuItem x:Name="preferences" Header="Preferences"/>
    <MenuItem x:Name="help" Header="Help"/>
   </Menu>
  </DockPanel>
  <TabControl x:Name="tabwin" Margin="137.224,46,19,7" Grid.Column="1">
   <TabItem x:Name="intakeformsub" Header="Elegibility Form">
    <Grid HorizontalAlignment="Left" Width="490"/>
   </TabItem>
   <TabItem Header="TabItem">
    <Grid/>
   </TabItem>
   <TabItem Header="TabItem">
    <Grid/>
   </TabItem>
   <TabItem Header="TabItem">
    <Grid>
     <Grid.ColumnDefinitions>
      <ColumnDefinition Width="0.567*"/>
      <ColumnDefinition Width="0.433*"/>
     </Grid.ColumnDefinitions>
    </Grid>
   </TabItem>
   <TabItem Header="TabItem">
    <Grid/>
   </TabItem>
   <TabItem Header="TabItem">
    <Grid>
     <Grid.ColumnDefinitions>
      <ColumnDefinition Width="0.735*"/>
      <ColumnDefinition Width="0.265*"/>
     </Grid.ColumnDefinitions>
    </Grid>
   </TabItem>
   <TabItem Header="TabItem">
    <Grid/>
   </TabItem>
   <TabItem Header="TabItem">
    <Grid/>
   </TabItem>
  </TabControl>
  <Grid x:Name="___buttontab" Margin="11.205,61,0,0" Grid.Column="1" HorizontalAlignment="Left" Width="122.019" VerticalAlignment="Top" Height="276">
   <Button VerticalAlignment="Top" Height="36" Content="Button"/>
   <Button Margin="0,40,0,0" Content="Oasis Assessments" VerticalAlignment="Top" Height="36"/>
   <Button Margin="0,80,0,0" VerticalAlignment="Top" Height="36" Content="Plan of Care"/>
   <Button Margin="0,120,0,0" VerticalAlignment="Top" Height="36" Content="Medication Profile" RenderTransformOrigin="0.421,5.556"/>
   <Button Margin="0,0,0,80" VerticalAlignment="Bottom" Height="36" Content="Clinical Notes"/>
   <Button Margin="0,0,0,40" VerticalAlignment="Bottom" Height="36" Content="Infection Control"/>
   <Button x:Name="intakeformbtn" VerticalAlignment="Top" Height="36" Content="Intake Form" Click="intakeform">
    <Button.BindingGroup>
     <BindingGroup/>
    </Button.BindingGroup>
   </Button>
   <Button VerticalAlignment="Bottom" Height="36" Content="Discharge Summary"/>
  </Grid>
  <ProgressBar HorizontalAlignment="Left" Margin="8,0,0,7" VerticalAlignment="Bottom" Width="104.795" Height="19" Grid.Column="1"/>
 </Grid>
</Window>
  • 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-14T23:26:55+00:00Added an answer on May 14, 2026 at 11:26 pm

    A way to solve this problem is to use another TabControl instead of buttons, but where the tab headers are retemplated to be buttons insteads of tabs visually. This way you don’t even have to handle the button changes.

    Try the following code:

    <Window
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     x:Class="WpfApplication16.MainWindow"
     x:Name="Window"
     Title="MainWindow"
     Width="687" Height="480" mc:Ignorable="d">
        <Window.Resources>
            <Storyboard x:Key="OnLoaded1"/>
    
            <Style TargetType="{x:Type TabItem}" x:Key="TabButtonStyle">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TabItem}">
                            <ToggleButton IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Path=IsSelected, Mode=TwoWay}"
                                                        Margin="10">
                                <ContentPresenter ContentSource="Header" />
                            </ToggleButton>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
    
        </Window.Resources>
        <Window.Triggers>
            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <BeginStoryboard Storyboard="{StaticResource OnLoaded1}"/>
            </EventTrigger>
        </Window.Triggers>
    
        <Grid x:Name="LayoutRoot" Margin="0,0,-16,1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0*"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <DockPanel Margin="8,8,0,7" LastChildFill="False" Grid.Column="1" HorizontalAlignment="Left" Width="660">
                <Menu VerticalAlignment="Top" Width="657" Height="32">
                    <MenuItem x:Name="file" Header="File"/>
                    <MenuItem x:Name="edit" Header="Edit">
                        <MenuItem Width="100" Height="100" Header="MenuItem"/>
                    </MenuItem>
                    <MenuItem x:Name="view" Header="View"/>
                    <MenuItem x:Name="preferences" Header="Preferences"/>
                    <MenuItem x:Name="help" Header="Help"/>
                </Menu>
            </DockPanel>
            <TabControl Margin="0,61,0,0" Grid.Column="1" ItemContainerStyle="{StaticResource TabButtonStyle}" TabStripPlacement="Left">
                <TabControl.Items>
                    <TabItem Header="Button">
                        <Grid>
                            <TabControl x:Name="tabwin">
                                <TabItem x:Name="intakeformsub" Header="Elegibility Form">
                                    <Grid HorizontalAlignment="Left" Width="490"/>
                                </TabItem>
                                <TabItem Header="TabItem">
                                    <Grid/>
                                </TabItem>
                                <TabItem Header="TabItem">
                                    <Grid/>
                                </TabItem>
                                <TabItem Header="TabItem">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="0.567*"/>
                                            <ColumnDefinition Width="0.433*"/>
                                        </Grid.ColumnDefinitions>
                                    </Grid>
                                </TabItem>
                                <TabItem Header="TabItem">
                                    <Grid/>
                                </TabItem>
                                <TabItem Header="TabItem">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="0.735*"/>
                                            <ColumnDefinition Width="0.265*"/>
                                        </Grid.ColumnDefinitions>
                                    </Grid>
                                </TabItem>
                                <TabItem Header="TabItem">
                                    <Grid/>
                                </TabItem>
                                <TabItem Header="TabItem">
                                    <Grid/>
                                </TabItem>
                            </TabControl>
                            <ProgressBar HorizontalAlignment="Left" Margin="8,0,0,7" VerticalAlignment="Bottom" Width="104.795" Height="19" Grid.Column="1"/>
                        </Grid>
                    </TabItem>
                    <TabItem Header="Oasis Assessments">
                        Foo
                    </TabItem>
                    <TabItem Header="Plan of Care">
                        Bar
                    </TabItem>
                    <TabItem Header="Medication Profile">
                    </TabItem>
                    <TabItem Header="Clinical Notes">
                    </TabItem>
                    <TabItem Header="Infection Control">
                    </TabItem>
                    <TabItem Header="Intake Form">
                    </TabItem>
                </TabControl.Items>
            </TabControl>
        </Grid>
    </Window>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to assign a block to a button object so that each
i am currently trying to assign each character that i get from a file
I'm trying to assign a function for each element in a loop. I would
I'm trying to assign the output of this command ( that is in my
I'm trying to ASSIGN dynamically exclusive meta-tags for each page: i.e: url.com/index.php?action=signup Header -
So i'm trying to assign a hyperlink to a single word in a {p}
I am trying to assign objects in an NSMutableArray using this code - (IBAction)variablePressed:(UIButton
I'm trying to assign integer to a newly created row: INSERT INTO wcategory (name,
I'm trying to assign DataContext to a MenuItem, which is part of ListBox. <Style
I am currently trying to assign an event handler to dynamically created rectangle objects.

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.