<Page x:Class="proverka.Glavnay"
      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:proverka"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="Glavnay">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="45"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Center">
            <Button Name="Basket" Visibility="Collapsed" Click="Basket_Click" >корзина</Button>
        </StackPanel>
        <Grid Grid.Row="1">
            <ListView Name="listProdyct">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <Border>
                            <Grid>
                                <StackPanel Orientation="Horizontal">
                                    <StackPanel>
                                        <Image Source="{Binding ProductPhoto}" Height="80"></Image>
                                    </StackPanel>
                                    <StackPanel>
                                        <TextBlock Text="{Binding ProductName}"></TextBlock>
                                        <TextBlock Text="{Binding ProductCost}"></TextBlock>
                                    </StackPanel>
                                </StackPanel>
                            </Grid>
                        </Border>
                    </DataTemplate>
                </ListView.ItemTemplate>
                <ListView.ContextMenu>
                    <ContextMenu>
                        <MenuItem Name="addOrder" Header="Добавить в корзину" Click="addOrder_Click"></MenuItem>
                    </ContextMenu>
                </ListView.ContextMenu>
            </ListView>
        </Grid>
        
    </Grid>
</Page>
