Add.axaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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="1000" d:DesignHeight="600"
  6. xmlns:vm="using:AVSchool.ViewModels"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="AVSchool.Views.Add">
  9. <Grid>
  10. <StackPanel Margin="10" Width="980" Height="580" Background="LightBlue">
  11. <StackPanel Margin="10">
  12. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  13. <Button Command="{Binding ToData}" HorizontalAlignment="Right" Margin="0,0,0,10">Назад</Button>
  14. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
  15. <TextBox Watermark="Фамилия" Width="235" Text="{Binding AddVM.TSurname}"/>
  16. <TextBox Margin="10,0,0,0" Width="175" Watermark="Имя" Text="{Binding AddVM.TName}"/>
  17. <TextBox Margin="10,0,0,0" Width="290" Watermark="Отчество" Text="{Binding AddVM.TPatronymic}"/>
  18. </StackPanel>
  19. <DatePicker Margin="0,10,0,0" Height="30" SelectedDate="{Binding AddVM.TBirthday}" HorizontalAlignment="Center"/>
  20. <StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center">
  21. <RadioButton Content="Мужской" Margin="0,0,20,0" IsChecked="{Binding AddVM.TGenderM}"/>
  22. <RadioButton Content="Женский" Margin="0,0,0,0"/>
  23. </StackPanel>
  24. <TextBox Watermark="Стаж работы" Margin="0,10,0,0" Text="{Binding AddVM.TExp}"/>
  25. <TextBox Watermark="mail" Margin="0,10,0,0" Text="{Binding AddVM.TMail}"/>
  26. <TextBox Watermark="phone" Margin="0,10,0,0" Text="{Binding AddVM.TPhone}"/>
  27. <StackPanel Orientation="Vertical">
  28. <ComboBox Margin="0,10,0,0" Width="725" ItemsSource="{Binding AddVM.CollSub}" SelectedItem="{Binding AddVM.SelectSubject}" MaxDropDownHeight="250">
  29. <ComboBox.ItemTemplate>
  30. <DataTemplate>
  31. <TextBlock Text="{Binding Item1}"/>
  32. </DataTemplate>
  33. </ComboBox.ItemTemplate>
  34. </ComboBox>
  35. <ListBox ItemsSource="{Binding AddVM.CollSubSelect}" Width="720" Height="150" HorizontalAlignment="Center" Margin="0,10,0,0">
  36. <ListBox.ItemTemplate>
  37. <DataTemplate>
  38. <TextBlock Text="{Binding Item1}"/>
  39. </DataTemplate>
  40. </ListBox.ItemTemplate>
  41. </ListBox>
  42. </StackPanel>
  43. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  44. <Button Margin="0,10,0,0" Command="{Binding AddVM.AddNew}" Content="Добавить"/>
  45. </StackPanel>
  46. </StackPanel>
  47. </StackPanel>
  48. </StackPanel>
  49. </Grid>
  50. </UserControl>