AddOrderWindow.xaml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <Window x:Class="Cafe.AddWindows.AddOrderWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Cafe.AddWindows"
  7. mc:Ignorable="d"
  8. Title="Новый заказ" Height="900" Width="1600" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize">
  9. <Grid>
  10. <ListBox Name="DishesList" VerticalAlignment="Top" HorizontalAlignment="Center" Width="1500" Height="450"
  11. ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Auto" SelectionChanged="DishesListSelectionChanged" Margin="0,100,0,0" d:ItemsSource="{d:SampleData ItemCount=5}">
  12. <ListBox.ItemsPanel>
  13. <ItemsPanelTemplate>
  14. <VirtualizingStackPanel IsItemsHost="True" Orientation="Horizontal"/>
  15. </ItemsPanelTemplate>
  16. </ListBox.ItemsPanel>
  17. <ListBox.ItemTemplate>
  18. <DataTemplate>
  19. <StackPanel Name="DishStack">
  20. <Image Source="{Binding Picture}" Width="250" Height="250"/>
  21. <Label Content="{Binding Name}" Width="250" Foreground="White" FontSize="25" Height="50"/>
  22. <Label Content="{Binding Price}" Width="250" Foreground="White" FontSize="25" Height="50"/>
  23. <Button Content="Убрать" Width="250" FontSize="25" Height="50" Click="DeliteDishClick"/>
  24. </StackPanel>
  25. </DataTemplate>
  26. </ListBox.ItemTemplate>
  27. </ListBox>
  28. <Button x:Name="BackButton" Content="Назад" HorizontalAlignment="Left" Margin="20,17,0,0" VerticalAlignment="Top" Height="39" Width="140" FontSize="25" Click="BackButtonClick"/>
  29. <Label Content="Сумма:" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="36" Height="60" Margin="1225,685,0,0"/>
  30. <Label Name="SumOfOrder" Content="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="36" Height="60" Margin="1352,685,0,0" Width="200"/>
  31. <Button Name="AddDish" Content="Добавить блюдо" HorizontalAlignment="Left" VerticalAlignment="Top" Height="60" Width="300" FontSize="36" Click="AddDishClick" Margin="53,687,0,0"/>
  32. <Button Name="ToOrder" Content="Сделать заказ" HorizontalAlignment="Center" VerticalAlignment="Top" Height="60" Width="250" FontSize="36" Click="ToOrderClick" Margin="0,792,0,0"/>
  33. <ComboBox x:Name="DishesBox" Height="60" Width="450" HorizontalAlignment="Left" Margin="400,687,0,0" VerticalAlignment="Top" Foreground="Black" FontSize="36"/>
  34. <ComboBox x:Name="TablesBox" Height="60" Width="450" HorizontalAlignment="Left" Margin="400,589,0,0" VerticalAlignment="Top" Foreground="Black" FontSize="36"/>
  35. <Label Content="Столик:" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="36" Height="60" Margin="266,589,0,0"/>
  36. </Grid>
  37. </Window>