ProfilePage.xaml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 Grid.Column="1"
  42. Margin="10"
  43. Background="{StaticResource color3}">
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="49"/>
  46. <RowDefinition/>
  47. </Grid.RowDefinitions>
  48. <TextBox Grid.Row="0"
  49. Name="EmailBox"
  50. Text="Email"
  51. FontSize="22"
  52. Background="{x:Null}"
  53. BorderBrush="{x:Null}"
  54. MinWidth="50">
  55. </TextBox>
  56. <TextBox Grid.Row="1"
  57. Text="Инфо: "
  58. FontSize="22"
  59. Background="{x:Null}"
  60. BorderBrush="{x:Null}">
  61. </TextBox>
  62. </Grid>
  63. </Grid>
  64. <ListBox Name="TestsListBox"
  65. Grid.Row="1"
  66. Margin="10,0,10,0"
  67. Background="{StaticResource color1}"
  68. BorderBrush="{x:Null}">
  69. <ScrollViewer VerticalScrollBarVisibility="Visible"/>
  70. <ListBox.ItemTemplate>
  71. <DataTemplate>
  72. <Border Width="{Binding Path=ActualWidth, ElementName=TestsListBox}"
  73. Margin="-10,0,0,0"
  74. Height="45"
  75. CornerRadius="10"
  76. Background="{StaticResource color2}"
  77. MouseDown="TestsListBox_Selected">
  78. <StackPanel Orientation="Horizontal">
  79. <Image Width="35"
  80. Height="35"
  81. Margin="5"
  82. HorizontalAlignment="Left"
  83. Source="/MyTests;component/Resources/approval.png">
  84. </Image>
  85. <StackPanel>
  86. <StackPanel Orientation="Horizontal">
  87. <Label Content="{Binding Name}"/>
  88. <Label Content="{Binding Users.Login}"/>
  89. </StackPanel>
  90. <TextBlock Margin="0,-7,0,0">
  91. <Run Text="Вопросов: " Foreground="White"/>
  92. <Run Text="{Binding Questions.Count, Mode=OneTime}" />
  93. </TextBlock>
  94. </StackPanel>
  95. </StackPanel>
  96. </Border>
  97. </DataTemplate>
  98. </ListBox.ItemTemplate>
  99. </ListBox>
  100. <Grid Grid.Row="2">
  101. <StackPanel Orientation="Horizontal"
  102. HorizontalAlignment="Center">
  103. <Button Visibility="Collapsed"
  104. Width="120"
  105. Margin="5,0,5,0"
  106. Content="Назад"
  107. FontSize="20"
  108. Click="BackButton">
  109. </Button>
  110. <Button Width="120"
  111. Margin="5,0,5,0"
  112. Content="Сохранить"
  113. FontSize="20"
  114. Click="SaveButton">
  115. </Button>
  116. </StackPanel>
  117. </Grid>
  118. </Grid>
  119. </Page>