FeaturesMenuUserControl.xaml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <UserControl x:Class="OOO_WriteAndClear.MVP.Views.FeaturesMenuUserControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:OOO_WriteAndClear.MVP.Views"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. d:Background="White"
  10. FontFamily="Comic Sans MS">
  11. <UserControl.Resources>
  12. <Style x:Key="ExitButtonStyle" TargetType="{x:Type Button}">
  13. <Setter Property="Width" Value="40"/>
  14. <Setter Property="Height" Value="40"/>
  15. <Setter Property="Template">
  16. <Setter.Value>
  17. <ControlTemplate TargetType="{x:Type Button}">
  18. <Image Height="{TemplateBinding Height}"
  19. Width="{TemplateBinding Width}"
  20. Source="/Assets/Pictures/ExitIcon.png"/>
  21. </ControlTemplate>
  22. </Setter.Value>
  23. </Setter>
  24. </Style>
  25. </UserControl.Resources>
  26. <Border Padding="10">
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="auto"/>
  30. <RowDefinition />
  31. <RowDefinition Height="auto"/>
  32. <RowDefinition Height="auto"/>
  33. <RowDefinition />
  34. </Grid.RowDefinitions>
  35. <Label Grid.Row="0"
  36. Content="Меню"
  37. HorizontalAlignment="Center"
  38. FontSize="18"/>
  39. <Button Style="{DynamicResource ExitButtonStyle}"
  40. HorizontalAlignment="Left"
  41. VerticalAlignment="Center" Click="Exit_ButtonClick"/>
  42. <Grid HorizontalAlignment="Right" VerticalAlignment="Top"
  43. Margin="0 0 10 0">
  44. <Grid.ColumnDefinitions>
  45. <ColumnDefinition Width="auto"/>
  46. <ColumnDefinition/>
  47. </Grid.ColumnDefinitions>
  48. <Grid.RowDefinitions>
  49. <RowDefinition Height="auto"/>
  50. <RowDefinition Height="auto"/>
  51. </Grid.RowDefinitions>
  52. <Image Grid.Column="0" Grid.RowSpan="2"
  53. Height="40" Width="40"
  54. VerticalAlignment="Top"
  55. Margin="0 0 10 0"
  56. Source="/Assets/Pictures/LoginFieldIcon.png"/>
  57. <TextBlock x:Name="DisplayingUserName"
  58. Grid.Column="1" Grid.Row="0"
  59. Text="Гость"
  60. Margin="0 0 0 5"/>
  61. <TextBlock x:Name="DisplayingUserRole"
  62. Grid.Column="1" Grid.Row="1"
  63. Foreground="Gray"/>
  64. </Grid>
  65. <Button Grid.Row="2"
  66. Height="40" Width="400"
  67. Margin="0 0 0 20"
  68. Background="#498c51" BorderThickness="0" Foreground="White"
  69. Content="Заказы" Click="GoToOrdersUserControl_ButtonClick"/>
  70. <Button Grid.Row="3"
  71. Height="40" Width="400"
  72. Background="#498c51" BorderThickness="0" Foreground="White"
  73. Content="Продукты" Click="GoToProductsUserControl_ButtonClick"/>
  74. </Grid>
  75. </Border>
  76. </UserControl>