<Window x:Class="EEMSMain.Views.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:EEMSMain.Views"
        mc:Ignorable="d"
        xmlns:prism="http://prismlibrary.com/"
        prism:ViewModelLocator.AutoWireViewModel="True"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <ItemsControl Grid.Column="0" ItemsSource="{Binding ContainerManager.Containers}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="8,4" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="8"/>
                            <ColumnDefinition Width="auto"/>
                        </Grid.ColumnDefinitions>
                        <Image Source="{Binding Value.Icon}" Height="26"/>

                        <RadioButton Grid.Column="2" GroupName="Module" Style="{StaticResource FunctionRadio}" FontSize="14" 
                                 IsChecked="{Binding Value.IsDefault, Mode=OneWay}" Content="{Binding Value.Name}"
                                 Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MainWindow}, Path=DataContext.OpenCommand}" 
                                 CommandParameter="{Binding Value}"/>
                    </Grid>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>

        <Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource LightDisableColor}"></Border>

        <Grid Grid.Column="2" Margin="12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="4"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock FontSize="16" FontWeight="Bold" Margin="6" Text="{Binding CurrentModule}"></TextBlock>

            <ContentControl Grid.Row="2" prism:RegionManager.RegionName="MainRegion"/>
        </Grid>
    </Grid>
</Window>
