<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="ViewAttraction" x:Name="listAttraction" 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="txtPriceOld" Grid.Row="2" FontSize="14" Text="{Binding PriceOld, StringFormat=Цена: 0.00 руб.}"/>
                            <TextBlock Name="txtPriceBaby" Grid.Row="3" FontSize="14" Text="{Binding PriceBaby, StringFormat=Цена: 0.00 руб.}"/>-->
                            <TextBlock Name="txtTypeAttraction" Grid.Row="2" FontSize="14" Text="{Binding Type.Type1, StringFormat=Тип: {0}}"/>

                            <!--<Button Content="Забронировать" Grid.Row="4" Foreground="White" 
                                BorderThickness="0" Background="Black" Click="btnBronClick" Height="30" Width="110" HorizontalAlignment="Right" Margin="5,5,5,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="grid_uslugi" Visibility="Visible">
                    <Image x:Name="img_bron" Source="image/logo.png" Margin="287,10,0,71"/>
                    <TextBlock x:Name="txt_bron"  FontSize="16" TextWrapping="Wrap" Margin="0,23,284,105" />
                    <Button x:Name="btn_bron" Content="Забронировать" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Margin="409,236,0,0" Click="btn_bron_Click"/>
                </Grid>
                <Grid x:Name="grid_uslugi1" Visibility="Visible">
                    <Image x:Name="img_bron1" Source="image/logo.png" Margin="0,0,319.6,31"/>
                    <TextBlock x:Name="txt_bron1" Text="bababababababababbabbababababababbababab BABBABABABABABABbaab babab" FontSize="16" TextWrapping="Wrap" Margin="320,0,-0.4,0" />
                </Grid>-->

        <Border x:Name="border_bron" BorderBrush="Black" BorderThickness="2" Background="White" Margin="232,124,162,128" Visibility="Hidden">
            <Grid x:Name="grid_bron" Margin="40.4,44.4,175.8,47.4" >
                <StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Дата:" FontSize="18" Width="140"/>
                        <TextBox x:Name="txtBron_Date" Width="100"/>
                    </StackPanel>
                </StackPanel>
                <TextBlock Text="Бронирование(название аттракциона)" HorizontalAlignment="Center" Margin="-30,-42,-387,41"/>
                <TextBlock Text="Количество: " FontSize="18" Margin="0,43,-2,-45"/>
                <TextBlock Text="Тип билета?: " FontSize="18" Margin="1,77,-3,-79"/>
                <TextBlock Text="К оплате: " FontSize="18" Margin="58,153,-132,-155"/>
                <Button x:Name="btn_pay" Content="Оплатить" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="btn_pay_Click" Margin="58,187,-58,-191"/>
                <Button x:Name="btn_cancel" Content="Отмена" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="btn_cancel_Click" Margin="394,187,-357,-191"/>

            </Grid>
        </Border>
    </Grid>
</Window>
