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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:51:10+00:00 2026-05-17T16:51:10+00:00

I am following wpf/mvvm method. I need to have a tab control…with multiple rows..i

  • 0

I am following wpf/mvvm method. I need to have a tab control…with multiple rows..i mean parent/child rows. When user click on a tab, all child tabs under that should be displayed…but only the page under one child tab should be loaded.

Can anyone help me regarding this please?

  • 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-17T16:51:11+00:00Added an answer on May 17, 2026 at 4:51 pm

    Yes you can do that by binding SelectedTabIndex property in tab Control to a string in ViewModel. ( So the whole thing lies in how you design the data structures in the ViewModel.)

    Regarding loading of Tab content on selection of Tab :

    Initially you can call a service from your ViewModel and get the number of tabs,populate it to a Observable collection and bind your Tabs to the collection. You can have a property called SelectedTab in your ViewModel and have its value as -1. Now after you have got the number of tabs and bound those tabs to the tab control (I am not loading the contents of tab; only the tabs for display) , you can set SelectedTab=0 and in the setter you can pass the TabId and load the data for the Tab.

    private string selectedTab = -1;
    public string SelectedTab 
    {
        get { return selectedTab; }
        set { 
               selectedTab = value;
               LoadTabContent(selectedTab);
               OnPropertyChanged("SelectedTab"); // I have implemented INotifyPropertyChanged event
            }
    }
    

    But make sure you dont have too many Tabs cos the application will perform very badly with too many tabs and too much data inside each tab because everytime when you select a different Tab, WPF will clear the contents of older Tab from visual tree.

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

Sidebar

Related Questions

Using MEF I want to do the following. I have a WPF Shell. To
In a WPF app that I'm writing using the MVVM pattern, I have a
I'm writing a WPF application using the MVVM pattern, based on the following article:
In a MVVM WPF application. How do you set a second windows parent from
Okay i'm trying to understand WPF and the popular MVVM Pattern. Now i have
I create the following WPF control a dot and a description label: * North
I have following WPF ListView: <ListView Grid.Column=2 Grid.Row=1 Margin=0,53,12,6 Name=lvwProperties ItemsSource={Binding Path=SelectedPropertyItems, Mode=TwoWay} Grid.ColumnSpan=2>
I am following the M-V-VM pattern for my WPF UI. I would like to
Problem is described and demonstrated on the following links: Paul Stovell WPF: Blurry Text
I've decoupled events in this WPF application in the following way. What is the

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.