12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <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.AllSubjectsModulesAndProgramTemplates"
- xmlns:vm="using:AvaloniaApplication4.ViewModels"
- x:DataType="vm:AllSubjectsModulesAndProgramTemplatesViewModel"
- Background="White"
- Padding="80">
- <ScrollViewer>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 20 0 0">
- <TextBlock Margin="0 0 0 25" Text="Предметы, модули, шаблоны программ" Classes="titleStyle" FontWeight="Bold"/>
- <TextBlock Margin="0 0 0 20" Text="Предметы" Classes="mediumText" FontWeight="Bold"/>
- <Button Command="{Binding $parent[UserControl].((vm:AllSubjectsModulesAndProgramTemplatesViewModel)DataContext).AddNewSubject}" Margin="0 0 0 20" Content="Добавить новый предмет" HorizontalAlignment="Stretch"/>
- <ListBox ItemsSource="{Binding Subjects}" Margin="0 0 0 25">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Margin="0 0 0 15">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="{Binding NameSubject}" Classes="mediumText" TextWrapping="Wrap" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- <Button Content="Редактировать" Command="{Binding $parent[UserControl].((vm:AllSubjectsModulesAndProgramTemplatesViewModel)DataContext).EditSubject}" CommandParameter="{Binding IdSubject}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <TextBlock Margin="0 0 0 20" Text="Модули" Classes="mediumText" FontWeight="Bold"/>
- <Button Command="{Binding $parent[UserControl].((vm:AllSubjectsModulesAndProgramTemplatesViewModel)DataContext).AddNewModule}" Margin="0 0 0 20" Content="Добавить новый модуль" HorizontalAlignment="Stretch"/>
- <ListBox ItemsSource="{Binding Modules}" Margin="0 0 0 25">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Margin="0 0 0 15">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="{Binding Name}" Classes="mediumText" TextWrapping="Wrap" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- <Button Content="Редактировать" Command="{Binding $parent[UserControl].((vm:AllSubjectsModulesAndProgramTemplatesViewModel)DataContext).EditModule}" CommandParameter="{Binding IdModule}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <TextBlock Margin="0 0 0 20" Text="Шаблоны программ" Classes="mediumText" FontWeight="Bold"/>
- <Button Command="{Binding $parent[UserControl].((vm:AllSubjectsModulesAndProgramTemplatesViewModel)DataContext).AddNewProgramTemplate}" Margin="0 0 0 20" Content="Добавить новый шаблон программы" HorizontalAlignment="Stretch"/>
- <ListBox ItemsSource="{Binding ProgramTemplates}" Margin="0 0 0 25">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Margin="0 0 0 15">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="{Binding NameProgram}" Classes="mediumText" TextWrapping="Wrap" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- <Button Content="Редактировать" Command="{Binding $parent[UserControl].((vm:AllSubjectsModulesAndProgramTemplatesViewModel)DataContext).EditProgramTemplate}" CommandParameter="{Binding IdProgramTemplate}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|