<TabControl Grid.Row="1" Grid.Column="2"
ItemsSource="{Binding CurrentEditorsList, UpdateSourceTrigger=PropertyChanged}"
SelectedIndex = "{Binding SelectedEditorIndex, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Name="EditorsTabControl">
<TabControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding DisplayName.Value, UpdateSourceTrigger=PropertyChanged}">
</TextBlock>
<Button Grid.Column="1"
Command="{Binding DataContext.CloseToolCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=TabControl}}"
CommandParameter="{Binding}"
HorizontalContentAlignment="Right">
</Button>
</Grid>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
<TabControl Grid.Row="1" Grid.Column="2"
ItemsSource="{Binding CurrentEditorsList, UpdateSourceTrigger=PropertyChanged}"
SelectedIndex = "{Binding SelectedEditorIndex, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Name="EditorsTabControl">
<TabControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding DisplayName.Value, UpdateSourceTrigger=PropertyChanged}">
</TextBlock>
<Button Grid.Column="1"
Command="{Binding DataContext.CloseToolCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=TabControl}}"
CommandParameter="{Binding}"
HorizontalContentAlignment="Right">
</Button>
</Grid>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>