123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- xmlns:viewmodel="using:Prakt12.ViewModels"
- x:Class="Prak12.Views.ShowTeachersView"
- Background="CadetBlue">
- <UserControl.Styles>
- <Style Selector="ItemsRepeater.CourcesRepeater">
- <Setter Property="ItemTemplate">
- <DataTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="- "/>
- <TextBlock Grid.Column="1" Text="{Binding IdCourseNavigation.CourseName}"/>
- </Grid>
- </DataTemplate>
- </Setter>
- </Style>
- <Style Selector="ItemsRepeater.SubjectsRepeater">
- <Setter Property="ItemTemplate">
- <DataTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="- "/>
- <TextBlock Grid.Column="1" Text="{Binding IdSubjectNavigation.SubjectName}"/>
- </Grid>
- </DataTemplate>
- </Setter>
- </Style>
- <Style Selector="ListBox.MainListBox">
- <Setter Property="ItemTemplate">
- <DataTemplate>
- <Border BorderThickness="1" BorderBrush=""
- Padding="30 30 30 20">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <StackPanel Orientation="Vertical"
- Grid.Column="0">
- <Label Content="Информация о преподователе:"
- FontWeight="Bold"
- Padding="0"/>
- <TextBlock Text="{Binding FIO}"/>
- <TextBlock Text="{Binding LabeledGender}"/>
- <TextBlock Text="{Binding LabeledBirthDate}"/>
- <TextBlock Text="{Binding LabeledWorkTime}"/>
- <Label Content="Средсво связи:"
- FontWeight="Bold"
- Padding="0"/>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"/>
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0"
- Text="{Binding LabeledEmail}"
- Margin="0 0 20 0"/>
- <TextBlock Grid.Column="1"
- Text="{Binding LabeledPhone}"/>
- </Grid>
- <Label Content="{Binding LabeledSummaryVolume}"
- FontWeight="Bold"
- Padding="0"/>
- <ItemsRepeater ItemsSource="{Binding TeachersCourses}"
- Classes="CourcesRepeater"/>
- </StackPanel>
- <StackPanel Orientation="Vertical"
- Grid.Column="1">
- <Label Content="Предметы:"
- FontWeight="Bold"
- Padding="0"/>
- <ItemsRepeater ItemsSource="{Binding TeachersSubjects}"
- Classes="SubjectsRepeater"
- Margin="1 0 0 0"/>
- </StackPanel>
- </Grid>
- </Border>
- </DataTemplate>
- </Setter>
- </Style>
- </UserControl.Styles>
- <Border Padding="10">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Label Content="Список"
- FontSize="16" FontWeight="Bold"
- Margin="0 0 0 10"
- HorizontalAlignment="Center" Grid.ColumnSpan="2"/>
- <Button Grid.Column="0" Grid.Row="0"
- Width="90" Height="30"
- Margin="0 0 0 10"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"
- HorizontalContentAlignment="Left"
- Command="{Binding AddNewTeacherCommand}"
- Background="White"
- BorderBrush="Blue"
- BorderThickness="1">
- <TextBlock Text="Добавить"
- Foreground="Blue"
- Background="#0000"/>
- </Button>
- <ListBox Grid.Row="1" Grid.ColumnSpan="2"
- Classes="MainListBox"
- ItemsSource="{Binding TeachersCollection}"/>
- </Grid>
- </Border>
- </UserControl>
|