ProfilePage.xaml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <Page x:Class="MyTests.Pages.ProfilePage"
  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:MyTests.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450"
  9. d:DesignWidth="676"
  10. Title="PartInfoPage"
  11. Background="{StaticResource color1}">
  12. <Grid Background="{StaticResource color2}"
  13. Margin="10">
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="215*"/>
  16. <RowDefinition Height="173*"/>
  17. <RowDefinition Height="50"/>
  18. </Grid.RowDefinitions>
  19. <Grid Grid.Row="0">
  20. <Grid.ColumnDefinitions>
  21. <ColumnDefinition Width="57*"/>
  22. <ColumnDefinition Width="143*"/>
  23. </Grid.ColumnDefinitions>
  24. <Grid Grid.Column="0">
  25. <Image Name="ProfileImage"
  26. MinHeight="100"
  27. MinWidth="100"
  28. Grid.Row="1"
  29. Margin="10"
  30. Source="/MyTests;component/Resources/StandartImage.png"
  31. MouseDown="EditImage_Click">
  32. </Image>
  33. </Grid>
  34. <Grid Name="UserInfoGrid"
  35. Grid.Column="1"
  36. Margin="10"
  37. Background="{StaticResource color3}">
  38. <StackPanel Grid.Row="0">
  39. <Label Name="FIOLabel"
  40. Content="FIO"
  41. FontSize="22"
  42. FontWeight="Bold">
  43. </Label>
  44. <StackPanel Orientation="Horizontal">
  45. <Label Content="Email: "
  46. Background="{x:Null}"
  47. BorderBrush="{x:Null}"
  48. FontSize="22"/>
  49. <TextBox Name="EmailBox"
  50. Text=" "
  51. FontSize="22"
  52. Background="{x:Null}"
  53. BorderBrush="{x:Null}"
  54. Width="{Binding Path=ActualWidth, ElementName=UserInfoGrid}"
  55. >
  56. </TextBox>
  57. </StackPanel>
  58. <StackPanel Grid.Row="1"
  59. Orientation="Horizontal">
  60. <Label Content="Инфо: "
  61. FontSize="22"
  62. Background="{x:Null}"
  63. BorderBrush="{x:Null}">
  64. </Label>
  65. <TextBox Name="InfoBox"
  66. Text=""
  67. FontSize="22"
  68. Background="{x:Null}"
  69. BorderBrush="{x:Null}"
  70. Width="{Binding Path=ActualWidth, ElementName=UserInfoGrid}">
  71. </TextBox>
  72. </StackPanel>
  73. </StackPanel>
  74. </Grid>
  75. </Grid>
  76. <ListBox Name="TestsListBox"
  77. Grid.Row="1"
  78. Margin="10,0,10,0"
  79. Background="{StaticResource color1}"
  80. BorderBrush="{x:Null}"
  81. SelectionChanged="TestsListBox_SelectionChanged"
  82. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  83. ScrollViewer.VerticalScrollBarVisibility="Hidden">
  84. <ListBox.ItemTemplate>
  85. <DataTemplate>
  86. <Border Width="{Binding Path=ActualWidth, ElementName=TestsListBox}"
  87. Margin="-10,0,0,0"
  88. Height="45"
  89. CornerRadius="10"
  90. Background="{StaticResource color2}">
  91. <Grid>
  92. <StackPanel Orientation="Horizontal">
  93. <Image Width="30"
  94. Height="30"
  95. Margin="10,5,5,5"
  96. HorizontalAlignment="Left"
  97. Source="{Binding testImage}">
  98. </Image>
  99. <StackPanel>
  100. <StackPanel Orientation="Horizontal">
  101. <Label Content="{Binding test.Name}"/>
  102. <Label Content="{Binding test.Users.Login}"/>
  103. </StackPanel>
  104. <TextBlock Margin="0,-7,0,0">
  105. <Run Text="Вопросов: " Foreground="White"/>
  106. <Run Text="{Binding test.Questions.Count, Mode=OneTime}"/>
  107. </TextBlock>
  108. </StackPanel>
  109. </StackPanel>
  110. <StackPanel Orientation="Horizontal"
  111. HorizontalAlignment="Right">
  112. <Button Width="30" Height="30"
  113. Margin="0,0,5,0"
  114. Content="✓"
  115. Visibility="{Binding Path=Visibility, ElementName=SaveButton}"
  116. Click="CheckResultsButton_Click">
  117. </Button>
  118. <Button Width="30" Height="30"
  119. Margin="0,0,5,0"
  120. Content="✎"
  121. Visibility="{Binding Path=Visibility, ElementName=SaveButton}"
  122. Click="EditTestButton_Click">
  123. </Button>
  124. <Button Width="30" Height="30"
  125. Margin="0,0,5,0"
  126. Content="✕"
  127. Visibility="{Binding Path=Visibility, ElementName=SaveButton}"
  128. Click="DeleteTestButton_Click">
  129. </Button>
  130. </StackPanel>
  131. </Grid>
  132. </Border>
  133. </DataTemplate>
  134. </ListBox.ItemTemplate>
  135. </ListBox>
  136. <Button Name="SaveButton"
  137. Grid.Row="2"
  138. Width="120"
  139. Height="40"
  140. Margin="5,0,5,0"
  141. Content="Сохранить"
  142. FontSize="20"
  143. Click="SaveButton_Click">
  144. </Button>
  145. </Grid>
  146. </Page>