Description:
Currently I'm in the process of creating a WPF application where the main content should be presented in a TabControl.
The TabControl exists of:
- A TabItem that contains an external control which has multiple views, whereby each view should be visible as Header on the TabControl;
- Multiple TabItems with our own content, each one with it's own header.
Styling of WPF controls is not the problem, but this case requires some special behaviour of the control itself. The problem is that the control should render multiple Headers per TabItem.
Questions:
- What is the best control to use for such a scenario?
- If using TabControl, what modifications should be made?
Thanks in advance.
Update #1
In response to vortex a prototype of such a control (as you can see, the external control is the Microsoft Office InfoPath FormControl):
<TabControl x:Name="FormViewsTabControl">
<TabItem>
<TabItem.Headers>
<TabItemHeader Text="View A" />
<TabItemHeader Text="View B" />
</TabItem.Headers>
<TabItem.Content>
<winforms:WindowsFormsHost x:Name="InfoPathFormsHost">
<infopath:FormControl x:Name="InfoPathFormControl" />
</winforms:WindowsFormsHost>
</TabItem.Content>
</TabItem>
<TabItem Header="Letter">
<local:CustomView />
</TabItem>
</TabControl>
<StackPanel Orientation="Horizontal">
, and I would also set the HeaderTemplate property instead of the Header and use a DataTemplate. – vortexwolf