<Page x:Class="MyMoviesWPF.MVVM.View.Pages.MoviePage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:MyMoviesWPF.MVVM.View.Pages"
      mc:Ignorable="d" 
      d:DesignHeight="900" d:DesignWidth="1600"
        Title="Фильм">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="213*"/>
            <ColumnDefinition Width="187*"/>

        </Grid.ColumnDefinitions>
        <StackPanel Margin="85,8,725,4">
            <Image HorizontalAlignment="Left" Margin="117,10,0,0" VerticalAlignment="Top"/>
        </StackPanel>



        <StackPanel Orientation="Vertical" HorizontalAlignment="Left"  VerticalAlignment="Top" >
            <StackPanel Orientation="Horizontal">
                <TextBlock TextWrapping="Wrap" Text="Жанр: " FontSize="20"/>
                <TextBlock TextWrapping="Wrap" Text="{Binding Genre.Name}" VerticalAlignment="Bottom"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock TextWrapping="Wrap" Text="Дата выхода: " FontSize="20"/>
                <TextBlock TextWrapping="Wrap" Text="{Binding Year}" VerticalAlignment="Bottom"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock TextWrapping="Wrap" Text="Языки: " FontSize="20"/>
                <TextBlock TextWrapping="Wrap" Text="{Binding Languages}" VerticalAlignment="Bottom"/>
            </StackPanel>
            <DataGrid ColumnWidth="*" IsReadOnly="True" AutoGenerateColumns="False" ItemsSource="{Binding ActorsCollection}" BorderBrush = "Transparent" Background = "Transparent" RowBackground = "Transparent">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="Актёры" Binding="{Binding IdactorNavigation.Name}" IsReadOnly="True"/>
                </DataGrid.Columns>
            </DataGrid>
            <StackPanel Orientation="Vertical">
                <TextBlock TextWrapping="Wrap" Text="Цена: "/>
                <TextBlock TextWrapping="Wrap" Text="{Binding Price}" HorizontalAlignment="Left" FontSize="20"/>
            </StackPanel>            

        </StackPanel>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"  VerticalAlignment="Bottom" Grid.Column="1" Height="75" Width="400" Margin="0,0,54,0">
            <Button Height="75" Width="200" Content="В корзину" Command="{Binding AddToCart}"/>
            <Button Height="75" Width="200" Content="Отмена"/>

        </StackPanel>
        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Top" Grid.Column="1">
            <MediaElement Height="512" Source="{Binding TrailerURL}" Name="mePlayer" Stretch="Uniform"  />
            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Name}" VerticalAlignment="Top" FontSize="20"/>
            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Description}" VerticalAlignment="Top" FontSize="16"/>

        </StackPanel>
    </Grid>
</Page>
