AddTeacher.axaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  6. xmlns:vm="using:scool.ViewModels"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="scool.Views.AddTeacher">
  9. <Grid>
  10. <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="15">
  11. <Button Command="{Binding ToData}" HorizontalAlignment="Right" Margin="0,0,0,10">Назад</Button>
  12. <StackPanel Orientation="Horizontal">
  13. <TextBox Watermark="Фамилия" Text="{Binding AddTeacherVM.TSurname}"/>
  14. <TextBox Margin="10,0,0,0" Watermark="Имя" Text="{Binding AddTeacherVM.TName}"/>
  15. <TextBox Margin="10,0,0,0" Watermark="Отчество" Text="{Binding AddTeacherVM.TPatronymic}"/>
  16. </StackPanel>
  17. <DatePicker Margin="0,15,20,0" SelectedDate="{Binding AddTeacherVM.TBirthday}"/>
  18. <StackPanel Orientation="Horizontal">
  19. <RadioButton Content="Мужской" Margin="0,0,20,0" IsChecked="{Binding AddTeacherVM.TGenderM}"/>
  20. <RadioButton Content="Женский" Margin="0,0,0,0"/>
  21. </StackPanel>
  22. <StackPanel Orientation="Horizontal">
  23. <TextBlock Text="Стаж работы" VerticalAlignment="Center" Margin="0,0,20,0"/>
  24. <TextBox Text="{Binding AddTeacherVM.TExp}"/>
  25. </StackPanel>
  26. <TextBox Watermark="email@mail.com" Margin="0,10,10,0" Text="{Binding AddTeacherVM.TMail}"/>
  27. <TextBox Watermark="880005553535" Margin="0,10,10,0" Text="{Binding AddTeacherVM.TPhone}"/>
  28. <StackPanel Orientation="Horizontal">
  29. <ComboBox Margin="0,10,10,0" Width="400" ItemsSource="{Binding AddTeacherVM.CollSub}" SelectedItem="{Binding AddTeacherVM.SelectSubject}" MaxDropDownHeight="250">
  30. <ComboBox.ItemTemplate>
  31. <DataTemplate>
  32. <TextBlock Text="{Binding Subject1}"/>
  33. </DataTemplate>
  34. </ComboBox.ItemTemplate>
  35. </ComboBox>
  36. <ListBox ItemsSource="{Binding AddTeacherVM.CollSubSelect}" Width="300" Height="150" Margin="30,10,0,0">
  37. <ListBox.ItemTemplate>
  38. <DataTemplate>
  39. <TextBlock Text="{Binding Subject1}"/>
  40. </DataTemplate>
  41. </ListBox.ItemTemplate>
  42. </ListBox>
  43. </StackPanel>
  44. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  45. <Button Margin="0,10,0,0" Command="{Binding AddTeacherVM.AddNew}" Content="Добавить"/>
  46. </StackPanel>
  47. </StackPanel>
  48. </Grid>
  49. </UserControl>