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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:15:53+00:00 2026-05-13T09:15:53+00:00

I have a tabcontrol which binds to an observable collection of tabs. The tabcontrol

  • 0

I have a tabcontrol which binds to an observable collection of tabs.

The tabcontrol always has the first tab which hosts a listview bound to another observable collection.

On selecting an item in that list view a new tab is created an focus given to it.

The problem I am having is:

  1. When I switch back to the first tab there is a pause while it redraws / creates the listview items (contains images so slow)

  2. The item selected before moving to the new tab is nolonger selected. Instead the listview is at the top with no item selected.

Can someone please explain to me how the tabcontrol operates is it really distroying the tab item content each time? and how I can instead have a behaviour where the item remains selected when I return to that tab?

Update:

I have confirmed by adding debug print messages to events that no events fire on this switch-back and forth but the first tab is being unloaded – more specifically the usercontrol hosted in that tab is??.

  • 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-13T09:15:53+00:00Added an answer on May 13, 2026 at 9:15 am

    First I needed to ensure my listview bound to my collection correctly i.e. the item stayed selected by adding the property:

    IsSynchronizedWithCurrentItem="True"
    

    I then added a loaded event handler to the listview so the item is scrolled into view on switching back:

    private void ListView_Loaded(object sender, RoutedEventArgs e)
    {
        ICollectionView collectionView = CollectionViewSource.GetDefaultView(DataContext);
        if (collectionView != null)
        {
            ItemControl.ScrollIntoView(collectionView.CurrentItem);
        }
    }   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a form, which hosts a tabcontrol. each of these tabs have plenty
I have a form which has only tab control in it. I want to
In my application I have a tab control which has several tab items. The
I have a TabControl that has four tabs: <TabControl> <TabItem><TextBox/></TabItem> <TabItem><UserControl/></TabItem> <TabItem><Label/></TabItem> <TabItem><Image/></TabItem> </TabControl>
I have a data bound tab control: <TabControl ItemsSource={Binding Products} Name=ProductsTabControl> <TabControl.ItemTemplate> <DataTemplate> <TextBlock
I have a WPF tabcontrol with 3 tabs. On the top of the first
I have close button in the header of each tab of TabControl. Tabs are
I have an application which has a tabcontrol that contains two tabpages. I have
I have a TabControl in my XAML which is just an empty control as
I have a Usercontrol(TabUserControl) which contains a TabControl. The Viewmodel of that UserControl loads

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.