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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:23:33+00:00 2026-05-30T19:23:33+00:00

I have a heavily templated TabControl – similar in design to the Scrollable Tab

  • 0

I have a heavily templated TabControl – similar in design to the Scrollable Tab Control found here. Like the linked tutorial, I have a “menu” button on the far right that displays a list of all the tabs in the TabControl. By selecting one of the menu items, you can immediately jump to that tab.

The MenuItem style is set up thusly (assuming we’re bound to a collection of TabItems):

<Style x:Key="TabMenuItem" TargetType="{x:Type MenuItem}">
    <!-- This will help us bind to the Header of a TabItem -->
    <Setter Property="Header" Value="{Binding Path=Header}" />
    <Setter Property="IsEnabled" Value="{Binding Path=IsEnabled}" />
    <Setter Property="IsCheckable" Value="{Binding Path=IsEnabled}" />
    <Setter Property="IsChecked" Value="{Binding Path=IsSelected}" />
</Style>

And the items are bound within the TabControl template like this:

<MenuItem ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TabControl}}, Path=Items}"
          ItemContainerStyle="{StaticResource TabMenuItem}" />

This works fine when the TabControl is populated by normal TabItems. It ceases to work if the TabItems are the result of a DataTemplate, when my TabControl is bound to a list of ViewModels. My ViewModels don’t contain those properties that my menu item refers to – only the resulting Template TabItem does.

So my ultimate question is; is there some syntax that allows me to bind to the collection of Templates (TabItems), rather than the collection of base ViewModel items?

  • 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-30T19:23:34+00:00Added an answer on May 30, 2026 at 7:23 pm

    You need to convert the binding source collection to tab items, thus the items collection will be tab items. There’s a pretty good example of a converter in the accepted answer for How bind TabControl?

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

Sidebar

Related Questions

I have a python template engine that heavily uses regexp. It uses concatenation like:
I have some heavily templated c++ code that I am working with. I can
I have a rails app that uses heavily js (over 1MB total). I'd like
I have a heavily parallelized build across 45 slaves (one master that just handles
I have code that relies heavily on yaml for cross-language serialization and while working
I have this c# web app that relies heavily on two dll files that
I have an iPhone app that heavily relies on the OpenCV library; as such,
We have an existing application that relies heavily on stored procedures and untyped DataSets.
I have a site which relies heavily on javaScript. I created a mirror site,
I have been working on a site that relies heavily on images, and so

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.