123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <Page x:Class="MyTests.Pages.ProfilePage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:MyTests.Pages"
- mc:Ignorable="d"
- d:DesignHeight="450"
- d:DesignWidth="676"
- Title="PartInfoPage"
- Background="{StaticResource color1}">
- <Grid Background="{StaticResource color2}"
- Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="215*"/>
- <RowDefinition Height="173*"/>
- <RowDefinition Height="50"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="57*"/>
- <ColumnDefinition Width="143*"/>
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <Image Name="ProfileImage"
- MinHeight="100"
- MinWidth="100"
- Grid.Row="1"
- Margin="10"
- Source="/MyTests;component/Resources/StandartImage.png"
- MouseDown="EditImage_Click">
- </Image>
- </Grid>
- <Grid Name="UserInfoGrid"
- Grid.Column="1"
- Margin="10"
- Background="{StaticResource color3}">
- <StackPanel Grid.Row="0">
- <Label Name="FIOLabel"
- Content="FIO"
- FontSize="22"
- FontWeight="Bold">
- </Label>
- <StackPanel Orientation="Horizontal">
- <Label Content="Email: "
- Background="{x:Null}"
- BorderBrush="{x:Null}"
- FontSize="22"/>
- <TextBox Name="EmailBox"
- Text=" "
- FontSize="22"
- Background="{x:Null}"
- BorderBrush="{x:Null}"
- Width="{Binding Path=ActualWidth, ElementName=UserInfoGrid}"
- >
- </TextBox>
- </StackPanel>
- <StackPanel Grid.Row="1"
- Orientation="Horizontal">
- <Label Content="Инфо: "
- FontSize="22"
- Background="{x:Null}"
- BorderBrush="{x:Null}">
- </Label>
- <TextBox Name="InfoBox"
- Text=""
- FontSize="22"
- Background="{x:Null}"
- BorderBrush="{x:Null}"
- Width="{Binding Path=ActualWidth, ElementName=UserInfoGrid}">
- </TextBox>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Grid>
- <ListBox Name="TestsListBox"
- Grid.Row="1"
- Margin="10,0,10,0"
- Background="{StaticResource color1}"
- BorderBrush="{x:Null}"
- SelectionChanged="TestsListBox_SelectionChanged"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Hidden">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border Width="{Binding Path=ActualWidth, ElementName=TestsListBox}"
- Margin="-10,0,0,0"
- Height="45"
- CornerRadius="10"
- Background="{StaticResource color2}">
- <Grid>
- <StackPanel Orientation="Horizontal">
- <Image Width="30"
- Height="30"
- Margin="10,5,5,5"
- HorizontalAlignment="Left"
- Source="{Binding testImage}">
- </Image>
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <Label Content="{Binding test.Name}"/>
- <Label Content="{Binding test.Users.Login}"/>
- </StackPanel>
- <TextBlock Margin="0,-7,0,0">
- <Run Text="Вопросов: " Foreground="White"/>
- <Run Text="{Binding test.Questions.Count, Mode=OneTime}"/>
- </TextBlock>
- </StackPanel>
- </StackPanel>
- <StackPanel Orientation="Horizontal"
- HorizontalAlignment="Right">
- <Button Width="30" Height="30"
- Margin="0,0,5,0"
- Content="✓"
- Visibility="{Binding Path=Visibility, ElementName=SaveButton}"
- Click="CheckResultsButton_Click">
- </Button>
- <Button Width="30" Height="30"
- Margin="0,0,5,0"
- Content="✎"
- Visibility="{Binding Path=Visibility, ElementName=SaveButton}"
- Click="EditTestButton_Click">
- </Button>
- <Button Width="30" Height="30"
- Margin="0,0,5,0"
- Content="✕"
- Visibility="{Binding Path=Visibility, ElementName=SaveButton}"
- Click="DeleteTestButton_Click">
- </Button>
- </StackPanel>
- </Grid>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <Button Name="SaveButton"
- Grid.Row="2"
- Width="120"
- Height="40"
- Margin="5,0,5,0"
- Content="Сохранить"
- FontSize="20"
- Click="SaveButton_Click">
- </Button>
- </Grid>
- </Page>
|