ProfilePage.xaml 6.2 KB

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