<Window x:Class="TeamViewerApi.MainWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:views="clr-namespace:TeamViewerApi.Views" 
        xmlns:viewModels="clr-namespace:TeamViewerApi.ViewModels" 
        Title="TeamViewer API" 
        Height="500" Width="700" 
        WindowStartupLocation="CenterScreen" 
        Icon="/TeamViewerApi;component/Images/teamviewer.ico">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <views:TokenView Grid.Row="0" />
        
        <TabControl Grid.Row="1" 
                    DataContext="{x:Static viewModels:MainWindowViewModel.Instance}" 
                    ItemsSource="{Binding Views, Mode=OneWay}" 
                    SelectedItem="{Binding SelectedView, Mode=TwoWay}">
            <TabControl.ItemContainerStyle>
                <Style TargetType="TabItem">
                    <Setter Property="Header" Value="{Binding DataContext.Header, Mode=OneWay}" />
                </Style>
            </TabControl.ItemContainerStyle>
        </TabControl>
    </Grid>
</Window>
