EditAndAddProgramTemplate.axaml 1.9 KB

123456789101112131415161718192021222324252627
  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.EditAndAddProgramTemplate"
  7. xmlns:vm="using:AvaloniaApplication4.ViewModels"
  8. x:DataType="vm:EditAndAddProgramTemplateViewModel"
  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 ProgramTemplate.CodeProgram}" Margin="0 0 0 22" Watermark="Код программы"/>
  15. <TextBox Text="{Binding ProgramTemplate.NameProgram}" Margin="0 0 0 22" Watermark="Наименование программы"/>
  16. <Grid Margin="0 0 0 30">
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="1*"/>
  19. <ColumnDefinition Width="1*"/>
  20. </Grid.ColumnDefinitions>
  21. <Button HorizontalAlignment="Stretch" Margin="5" Content="Сохранить шаблон" Command="{Binding $parent[UserControl].((vm:EditAndAddProgramTemplateViewModel)DataContext).Save}" Grid.Column="0"/>
  22. <Button IsEnabled="{Binding IsNotNew}" HorizontalAlignment="Stretch" Command="{Binding $parent[UserControl].((vm:EditAndAddProgramTemplateViewModel)DataContext).Delete}" Margin="5" Content="Удалить шаблон" Grid.Column="1"/>
  23. </Grid>
  24. <Button HorizontalAlignment="Stretch" Command="{Binding $parent[UserControl].((vm:EditAndAddProgramTemplateViewModel)DataContext).GoBack}" Content="Вернуться назад"/>
  25. </StackPanel>
  26. </ScrollViewer>
  27. </UserControl>