MainPage.xaml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <Page x:Class="HelpHelf.Pages.MainPage"
  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:HelpHelf.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="MainPage">
  10. <Grid Margin="5">
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="70"/>
  13. <RowDefinition Height="50"/>
  14. <RowDefinition Height="1*"/>
  15. <RowDefinition Height="70"/>
  16. </Grid.RowDefinitions>
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="1*"/>
  19. <ColumnDefinition Width="1*"/>
  20. </Grid.ColumnDefinitions>
  21. <StackPanel Grid.ColumnSpan="2" VerticalAlignment="Center"
  22. Orientation="Horizontal" HorizontalAlignment="Left"
  23. Grid.Row="0">
  24. <Button Click="btnPersonalAccount_Click" Background="white" Padding="5"
  25. BorderBrush="#0B61A4" BorderThickness="3"
  26. FontFamily="Calibri" FontSize="20"
  27. Name="btnPersonalAccount" Width="160" Content="Личный кабинет"
  28. Cursor="Hand"/>
  29. </StackPanel>
  30. <StackPanel Grid.ColumnSpan="2" VerticalAlignment="Center"
  31. Orientation="Horizontal" HorizontalAlignment="Right"
  32. Grid.Row="0">
  33. <TextBlock VerticalAlignment="Center" Margin="0,0,20,0" FontFamily="Calibri"
  34. Foreground="#0B61A4" FontWeight="Bold" FontSize="26"
  35. Name="tbName"/>
  36. <Button Click="btnExit_Click" Background="White" Padding="5"
  37. BorderBrush="#0B61A4" BorderThickness="3"
  38. FontFamily="Calibri" FontSize="20" Name="btnExit"
  39. Width="140" Content="Выход" Cursor="Hand"/>
  40. </StackPanel>
  41. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"
  42. Margin="0,0,20,0" FontFamily="Calibri" Foreground="#0B61A4"
  43. FontWeight="Bold" FontSize="20" Grid.Row="1"
  44. Text="Дневник самочувствия"/>
  45. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"
  46. Margin="0,0,20,0" FontFamily="Calibri" Foreground="#0B61A4"
  47. FontWeight="Bold" FontSize="20" Grid.Row="1" Grid.Column="1"
  48. Text="Результаты тестирования"/>
  49. <Button Click="btnAddBlog_Click" Grid.Row="3" Height="40" Background="White"
  50. Padding="5" BorderBrush="#0B61A4" BorderThickness="3"
  51. FontFamily="Calibri" FontSize="20" Name="btnAddBlog"
  52. Width="300" Content="Добавить запись в дневник" Cursor="Hand"/>
  53. <Button Click="btnTest_Click" Grid.Row="3" Grid.Column="1" Height="40" Background="White"
  54. Padding="5" BorderBrush="#0B61A4" BorderThickness="3"
  55. FontFamily="Calibri" FontSize="20" Name="btnTest"
  56. Width="300" Content="Пройти тестирование" Cursor="Hand"/>
  57. <ListView Name="listBlogs" Grid.Row="2"
  58. HorizontalContentAlignment="Stretch"
  59. ScrollViewer.CanContentScroll="False">
  60. <ListView.ItemTemplate>
  61. <DataTemplate>
  62. <StackPanel>
  63. <Border BorderBrush="#0B61A4" BorderThickness="2"
  64. CornerRadius="10">
  65. <Grid>
  66. <Grid.RowDefinitions>
  67. <RowDefinition Height="3*"/>
  68. <RowDefinition Height="1*"/>
  69. </Grid.RowDefinitions>
  70. <TextBlock Margin="10,0"
  71. TextWrapping="WrapWithOverflow"
  72. VerticalAlignment="Center" FontFamily="Calibri"
  73. FontSize="20" Grid.Row="0" Text="{Binding Entry}"/>
  74. <TextBlock Margin="0,0,10,0"
  75. TextWrapping="WrapWithOverflow"
  76. VerticalAlignment="Center" HorizontalAlignment="Right"
  77. FontFamily="Calibri" FontSize="16" Grid.Row="1"
  78. Text="{Binding Date, StringFormat={}dd.MM.yyyy}"/>
  79. </Grid>
  80. </Border>
  81. </StackPanel>
  82. </DataTemplate>
  83. </ListView.ItemTemplate>
  84. </ListView>
  85. <ListView SelectionChanged="listTest_SelectionChanged" ScrollViewer.CanContentScroll="False" Name="listTest" Grid.Row="2"
  86. Grid.Column="1" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  87. HorizontalContentAlignment="Stretch">
  88. <ListView.ItemTemplate>
  89. <DataTemplate>
  90. <Grid>
  91. <StackPanel>
  92. <TextBlock TextWrapping="WrapWithOverflow" FontFamily="Calibri"
  93. FontSize="20">
  94. <Run Text="Дата:" FontWeight="Bold"/>
  95. <Run Text="{Binding Date, StringFormat={}dd.MM.yyyy}"/>
  96. </TextBlock>
  97. <TextBlock TextWrapping="WrapWithOverflow" FontFamily="Calibri"
  98. FontSize="20">
  99. <Run Text="Заболевание:" FontWeight="Bold"/>
  100. <Run Text="{Binding Diseases, Mode=OneWay}"/>
  101. </TextBlock>
  102. </StackPanel>
  103. </Grid>
  104. </DataTemplate>
  105. </ListView.ItemTemplate>
  106. </ListView>
  107. <TextBlock Name="tbEmptyBlog" Visibility="Collapsed" VerticalAlignment="Center"
  108. HorizontalAlignment="Center" Margin="0,0,20,0" FontFamily="Calibri"
  109. FontWeight="Bold" FontSize="20" Grid.Row="2" Grid.Column="0"
  110. Text="Записи не найдены"/>
  111. <TextBlock Name="tbEmptyTest" Visibility="Collapsed" VerticalAlignment="Center"
  112. HorizontalAlignment="Center" Margin="0,0,20,0" FontFamily="Calibri"
  113. FontWeight="Bold" FontSize="20" Grid.Row="2" Grid.Column="1"
  114. Text="Результаты тестирования не найдены"/>
  115. </Grid>
  116. </Page>