TabControl with Region

my MainRegion is an ItemsControl. To this MainRegion i add different UserControls. One of this Controls is a TabControl with one fixed TabItem, the other two TabItems should be defiend as Regions, so i can change the contend of both by Commands.

I can think of two possible approaches to achieve what you want. One of them is the one you are proposing, where your
TabControl would look like this in XAML (the code below assumes you are using Silverlight, but for WPF it should be quite similar):

<Controls:TabControl><Controls:TabItem><TextBlock>I am in no region</TextBlock></Controls:TabItem><Controls:TabItemRegions:RegionManager.RegionName="RegionOne"Header="RegionOne"/><Controls:TabItemRegions:RegionManager.RegionName="RegionTwo"Header="RegionTwo"/></Controls:TabControl>

As
TabItems inherit from
ContentControl, the ContentControlRegionAdapter will create a
SingleActiveRegion for each of them.

Another possible approach could be marking the
TabControl as a Region and add different views to it (still having a fixed
TabItem). This approach can bee seen in the UIComposition Quickstarts (ViewDiscovery and
View Injection).

ContentControl's Content property is not empty.
This control is being associated with a region, but the control is already bound to something else.
If you did not explicitly set the control's Content property,
this exception may be caused by a change in the value of the inherited RegionManager attached property.

In the case of the
ContentControl (opposed to
Selector and
ItemsControl), you cannot make the control a Region if it already has content. So, if I understand correctly you added a Label inside each of the
TabItems. As they are ContentControls you get an error. Summarizing, if you mark a
ContentControl as a region you can only add views to it, not direct content.

<Controls:TabControl><Controls:TabItem><TextBlock>I am in no region</TextBlock></Controls:TabItem><Controls:TabItemRegions:RegionManager.RegionName="RegionOne"Header="RegionOne"/><Controls:TabItemRegions:RegionManager.RegionName="RegionTwo"Header="RegionTwo"/></Controls:TabControl>

But how can i do it in C# code behind if i want to dynamically add TabItem with new RegionName for each new TabItem?

If your scenario requires to add multiple tabitems, you could use the Damian’s second approach. It allows you to add programmatically TabItems. For more information on this topic, you could check the
View Injection Quickstart.

This Quickstart contains a TabControl marked as a region and has two fixed TabItems in xaml (General and Location). When an employee is selected the application programmatically adds a new TabItem (Current Projects) using View Injection.