Make TabControl show contents based on multiple (derived) TabItem Dependency Properties
Posted on 2011-02-21
I'm deriving TabControl to make a control called Wizard. Wizard can only contain instances of WizardPage (derived from TabItem).
WizardPage contains, along with the existing Content, a "TopLeftContent" and "TopRightContent" which the user defines in XAML. My Wizard needs to show all three of these somehow in the display area.
The Wizard's existing template uses a ContentPresenter to display ContentSource="SelectedContent", which automagically somehow returns SelectedItem.Content (the currently selected TabItem's Content property). My problem is that I have no idea how to make a ContentPresenter display ContentSource="SelectedItem.TopLeftContent". This syntax isn't supported apparently.
I've looked quite extensively, but I can't seem to figure out how to do this w/o exposing another DP that the user will foolishly want to bind to. I need this to work against the SelectedItem.
Is there a way?