EditAndAddSubject.axaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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="990"
  6. x:Class="AvaloniaApplication4.Views.ActionPages.EditAndAddSubject"
  7. xmlns:vm="using:AvaloniaApplication4.ViewModels"
  8. x:DataType="vm:EditAndAddSubjectViewModel"
  9. Background="White"
  10. Padding="80">
  11. <ScrollViewer>
  12. <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 20 0 0">
  13. <TextBlock Margin="0 0 0 39" Text="Предметы" Classes="titleStyle" FontWeight="Bold"/>
  14. <TextBox Text="{Binding Subject.NameSubject}" Margin="0 0 0 22" Watermark="Наименование предмета"/>
  15. <TextBlock Margin="0 0 0 13" Text="Код предмета" Classes="litleText"/>
  16. <ComboBox ItemsSource="{Binding CodeAcademicSubjects}" SelectedItem="{Binding Code, Mode=TwoWay}" Margin="0 0 0 22" HorizontalAlignment="Stretch">
  17. <ComboBox.ItemTemplate>
  18. <DataTemplate>
  19. <TextBlock Text="{Binding IdCodeAcademicSubjects}"/>
  20. </DataTemplate>
  21. </ComboBox.ItemTemplate>
  22. </ComboBox>
  23. <TextBlock Margin="0 0 0 13" Text="Учебный стандарт" Classes="litleText"/>
  24. <ComboBox ItemsSource="{Binding TrainingStandartList}" SelectedItem="{Binding TrainingStandart, Mode=TwoWay}" Margin="0 0 0 22" HorizontalAlignment="Stretch">
  25. <ComboBox.ItemTemplate>
  26. <DataTemplate>
  27. <TextBlock Text="{Binding NameTrainingStandart}"/>
  28. </DataTemplate>
  29. </ComboBox.ItemTemplate>
  30. </ComboBox>
  31. <Grid Margin="0 0 0 30">
  32. <Grid.ColumnDefinitions>
  33. <ColumnDefinition Width="1*"/>
  34. <ColumnDefinition Width="1*"/>
  35. </Grid.ColumnDefinitions>
  36. <Button HorizontalAlignment="Stretch" Margin="5" Content="Сохранить предмет" Command="{Binding $parent[UserControl].((vm:EditAndAddSubjectViewModel)DataContext).Save}" Grid.Column="0"/>
  37. <Button IsEnabled="{Binding IsNotNew}" HorizontalAlignment="Stretch" Command="{Binding $parent[UserControl].((vm:EditAndAddSubjectViewModel)DataContext).Delete}" Margin="5" Content="Удалить предмет" Grid.Column="1"/>
  38. </Grid>
  39. <Button HorizontalAlignment="Stretch" Command="{Binding $parent[UserControl].((vm:EditAndAddSubjectViewModel)DataContext).GoBack}" Content="Вернуться назад"/>
  40. </StackPanel>
  41. </ScrollViewer>
  42. </UserControl>