ProfilePage.xaml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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="800"
  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. <ScrollViewer VerticalScrollBarVisibility="Visible"/>
  87. <ListBox.ItemTemplate>
  88. <DataTemplate>
  89. <Border Width="{Binding Path=ActualWidth, ElementName=TestsListBox}"
  90. Margin="-10,0,0,0"
  91. Height="45"
  92. CornerRadius="10"
  93. Background="{StaticResource color2}"
  94. MouseDown="TestsListBox_Selected">
  95. <StackPanel Orientation="Horizontal">
  96. <Image Width="35"
  97. Height="35"
  98. Margin="5"
  99. HorizontalAlignment="Left"
  100. Source="/MyTests;component/Resources/approval.png">
  101. </Image>
  102. <StackPanel>
  103. <StackPanel Orientation="Horizontal">
  104. <Label Content="{Binding Name}"/>
  105. <Label Content="{Binding Users.Login}"/>
  106. </StackPanel>
  107. <TextBlock Margin="0,-7,0,0">
  108. <Run Text="Вопросов: " Foreground="White"/>
  109. <Run Text="{Binding Questions.Count, Mode=OneTime}"/>
  110. </TextBlock>
  111. </StackPanel>
  112. </StackPanel>
  113. </Border>
  114. </DataTemplate>
  115. </ListBox.ItemTemplate>
  116. </ListBox>
  117. <Button Grid.Row="2"
  118. Width="120"
  119. Margin="5,0,5,0"
  120. Content="Сохранить"
  121. FontSize="20"
  122. Click="SaveButton">
  123. </Button>
  124. </Grid>
  125. </Page>