123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <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="1000" d:DesignHeight="990"
- x:Class="AvaloniaApplication4.Views.ActionPages.EditAndAddStudent"
- xmlns:vm="using:AvaloniaApplication4.ViewModels"
- x:DataType="vm:EditAndAddStudentViewModel"
- Background="White"
- Padding="80">
- <ScrollViewer>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 20 0 0">
- <TextBlock Margin="0 0 0 39" Text="Студенты" Classes="titleStyle" FontWeight="Bold"/>
- <TextBlock Margin="0 0 0 20" Text="Личные данные" Classes="mediumText" FontSize="24" FontWeight="Bold"/>
- <TextBlock Margin="0 0 0 13" Text="Имя" Classes="litleText"/>
- <TextBox Text="{Binding Student.Name}" Margin="0 0 0 22" Watermark="Имя"/>
- <TextBlock Margin="0 0 0 13" Text="Фамилия" Classes="litleText"/>
- <TextBox Text="{Binding Student.Surname}" Margin="0 0 0 22" Watermark="Фамилия"/>
- <TextBlock Margin="0 0 0 13" Text="Отчество" Classes="litleText"/>
- <TextBox Text="{Binding Student.Patronumic}" Margin="0 0 0 22" Watermark="Отчество"/>
- <TextBlock Margin="0 0 0 13" Text="Образование" Classes="litleText"/>
- <ComboBox Margin="0 0 0 22" ItemsSource="{Binding AllEducations}" SelectedIndex="{Binding IdEducationStudent, Mode=TwoWay}" HorizontalAlignment="Stretch">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Name}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <TextBlock Margin="0 0 0 20" Text="Программа" Classes="mediumText" FontSize="24" FontWeight="Bold"/>
- <ComboBox Margin="0 0 0 22" ItemsSource="{Binding AllPrograms}" SelectedIndex="{Binding IdProgramStudent, Mode=TwoWay}" HorizontalAlignment="Stretch">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding IdProgramTemplateNavigation.NameProgram}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Grid Margin="0 0 0 30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <Button Name="saveBtn" HorizontalAlignment="Stretch" Margin="5" Content="Сохранить студента" Grid.Column="0" Command="{Binding $parent[UserControl].((vm:EditAndAddStudentViewModel)DataContext).Save}"/>
- <Button Name="delBtn" HorizontalAlignment="Stretch" Margin="5" Content="Удалить студента" Grid.Column="1" Command="{Binding $parent[UserControl].((vm:EditAndAddStudentViewModel)DataContext).Delete}"/>
- </Grid>
- <Button HorizontalAlignment="Stretch" Content="Вернуться назад" Command="{Binding $parent[UserControl].((vm:EditAndAddStudentViewModel)DataContext).GoBack}"/>
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|