I have a TabControl with dynamically created tabs and content that vary depending on the XML that is passed in but, I also need a couple of TabItems to be created regardless of the XML content. When I add a <TabItem Header="Users"/>
I receive a Items Collection must be empty before using an ItemsSource. Here is what I have now:
<TabControl ItemsSource="{Binding Content}">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="Header"/>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<TextBlock Text="Tab Content"/>
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
Is there anyway to do this? Thanks!