<Window x:Class="mateo.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:mateo"
        mc:Ignorable="d"
        Title="Mateo" Height="540" Width="960" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="None">

    <Grid Background="#ffff">
        <Grid Margin="0,0,824,0" Background="#E74C32">
            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="48,371,48,129" Click="btn_insta">
                <Image Source="image\insta.png" Height="40" Width="40"/>
            </Button>

            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="48,331,48,169" Click="btn_vk">
                <Image Source="image\vk.png" Height="40" Width="40"/>
            </Button>

            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="48,413,48,87" Click="btn_whatsapp">
                <Image Source="image\whatsapp.png" Height="40" Width="40"/>
            </Button>

            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="48,454,48,46" Click="btn_gmail">
                <Image Source="image\gmail.png" Height="40" Width="40"/>
            </Button>
        </Grid>
        <Grid Background="#E74C32" Margin="0,0,0,470">
            <Image Source="image/logo.png" Margin="0,0,820,-20"/>
            <Button Content="Профиль" FontSize="16" BorderThickness="0" Background="Transparent" Margin="627,10,223,10" MaxWidth="80" Click="btnProfileClick"/>
            <Button Content="Услуги" FontSize="16" BorderThickness="0" Background="Transparent" Margin="146,10,674,10" MaxWidth="80" Click="btnUslugiClick"/>
            <TextBlock Text="Парк развлечений" HorizontalAlignment="Center" FontSize="28" Foreground="#ffff" Margin="282,5,327,0"/>
            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Click="btnLogout" Margin="860,14,60,16">
                <Image Source="image\logout.png" Height="40" Width="40"/>
            </Button>
            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Click="btnExit" Margin="910,14,10,16">
                <Image Source="image\exit.png" Height="40" Width="40"/>
            </Button>
            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Click="btnTickets" Margin="810,14,105,16">
                <Image Source="image\tickets.png" Height="40" Width="40"/>
            </Button>
        </Grid>

        <!--вывод всех аттракционов-->
        <ListView MouseDoubleClick="ViewAllAttraction" x:Name="listAllAttraction" Margin="150,80,10,10" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalContentAlignment="Center" ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0">
            <ListView.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
                </ItemsPanelTemplate>
            </ListView.ItemsPanel>
            <ListView.ItemTemplate>
                <DataTemplate>
                    <Border BorderBrush="Black" BorderThickness="2">
                        <Grid Margin="15" >
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>
                            <Image Source="{Binding ImageAttraction}" Width="200" Height="100" 
                               Grid.Row="1" Stretch="Uniform" HorizontalAlignment="Center" Margin="5"/>
                            <TextBlock Grid.Row="0" HorizontalAlignment="Center" FontSize="18" Text="{Binding NameAttraction}"/>
                            <TextBlock Name="txtTypeAttraction" Grid.Row="2" FontSize="14" Text="{Binding Type.Type1, StringFormat=Тип: {0}}"/>
                        </Grid>
                    </Border>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

        <!--просмотр каждого аттракциона и выбор нужного-->
        <ScrollViewer x:Name="stackAttraction" Margin="136,80,0,0" Background="White" Visibility="Hidden">
            <StackPanel>
                <TextBlock x:Name="txtNameAttraction" FontSize="18" TextAlignment="Center" HorizontalAlignment="Center"/>
                <Image x:Name="imgAttraction" Width="300" Height="250"/>
                <TextBlock x:Name="txtDescriptionAttraction" HorizontalAlignment="Center" FontSize="16" TextWrapping="Wrap" Margin="60,15,60,15"/>
                <StackPanel x:Name="stackPriceOld" Orientation="Horizontal" Margin="5">
                    <TextBlock x:Name="txtPriceOld" Width="150" FontSize="16" Margin="50,0,0,0"/>
                    <Button Content="+" FontSize="16" Width="30" Height="30" Click="BtnAddOldAttraction"/>
                </StackPanel>
                <StackPanel x:Name="stackPriceBaby" Orientation="Horizontal" Margin="5">
                    <TextBlock x:Name="txtPriceBaby" Width="150" FontSize="16" Margin="50,0,0,0"/>
                    <Button Content="+" FontSize="16" Width="30" Height="30" Click="BtnAddBabyAttraction"/>
                </StackPanel>
                <Button Content="Назад" HorizontalAlignment="Right" FontSize="16" Width="100" Height="40" Click="btnBackAttraction" Margin="0,0,25,25"/>
            </StackPanel>
        </ScrollViewer>

        <!--вывод добавленных билетов-->
        <Grid x:Name="gridTickets" Visibility="Hidden" Background="White" Margin="136,70,0,0">
            <ListView x:Name="listTickets" Margin="0,0,120,0" Background="White" BorderThickness="0"  ScrollViewer.VerticalScrollBarVisibility="Hidden">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <Border BorderBrush="Black" BorderThickness="2">
                            <StackPanel Orientation="Horizontal" Height="200">
                                <StackPanel.Background>
                                    <ImageBrush ImageSource="image\tickets2.png"/>
                                </StackPanel.Background>
                                <TextBlock x:Name="txtNameTickets" Text="{Binding Attraction.NameAttraction}" VerticalAlignment="Center"  Width="200" FontSize="20" TextTrimming="WordEllipsis" Margin="20"/>
                                <TextBlock x:Name="txtTypeTickets" Text="{Binding TypeTickets.TypeTickets1}" VerticalAlignment="Center" Width="80" FontSize="16"/>
                                <TextBlock x:Name="txtPriceAttraction" VerticalAlignment="Center" Text="{Binding Summ, StringFormat=0.00 руб.}" Width="100" FontSize="16"/>
                                <Button Content="-" Height="30" Width="30" FontSize="24" Background="Transparent" Margin="5" Click="BtnTicketsMinus"/>
                                <TextBlock x:Name="txtQuantityTickets" VerticalAlignment="Center" TextAlignment="Center" Text="{Binding Quantity}" Width="30" FontSize="16"/>
                                <Button Content="+" Height="30" Width="30" FontSize="24" Background="Transparent"  Margin="5" Click="BtnTicketsPlus"/>
                                <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="50,0,40,0" Click="BtnDeleteTickets">
                                    <Image Source="image\delete.png"/>
                                </Button>
                            </StackPanel>
                        </Border>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
            <StackPanel HorizontalAlignment="Right">
                <TextBlock x:Name="txtSumm" Text="Сумма: " FontSize="18" HorizontalAlignment="Center"/>
                <Button Content="Оплатить всё" Height="50" Width="120" Margin="5" FontSize="16" Background="Transparent" Click="BtnPuyAll"/>
            </StackPanel>
        </Grid>



        <!--раздел профиль-->
        <Grid x:Name="gridProfile" Visibility="Hidden">
            <Image x:Name="imgProfile" Margin="329,141,535,318"/>
            <Button x:Name="btnAddPhoto" Content="добавить фото" Background="Transparent" Click="BtnAddPhoto" Margin="329,227,535,287"/>
            <Button Content="удалить фото" Background="Transparent" Click="BtnDeletePhoto" Margin="329,258,535,256"/>
            <TextBlock x:Name="txtNameProfile" FontSize="24" Margin="463,141,178,355" />
            <TextBlock x:Name="txtBalanceProfile" Text="Баланс карты: " FontSize="16" Margin="463,190,178,287"/>
            <Button Content="Пополнить баланс" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Margin="463,410,275,83" Click="BtbBalance"/>
        </Grid>

        <!--пополнение баланса-->
        <Grid x:Name="gridPlusBalance" Visibility="Hidden" Background="White" Margin="136,70,0,0">
            <Image Source="image\card.png" Width="480" Height="320" VerticalAlignment="Top"/>
            <TextBox FontSize ="24" Background="Transparent" Margin="292,182,209,257" />

            <StackPanel Orientation="Horizontal" Height="80" VerticalAlignment="Bottom" HorizontalAlignment="Right">
                <TextBlock Text="Сумма пополнения: " FontSize="20" VerticalAlignment="Center"/>
                <TextBox x:Name="txtPlusBalabce" FontSize="20" VerticalAlignment="Center" Width="120" />
                <Button Content="Пополнить" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="BtbPlusBalance" Width="120" Height="50" Margin="15"/>
                <Button Content="Отмена" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="BtnCancelBalance" Width="120" Height="50" Margin="15"/>
            </StackPanel>
        </Grid>



    </Grid>
</Window>
