MySubjects.axaml 1.6 KB

123456789101112131415161718192021222324252627282930
  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.MySubjects"
  7. xmlns:vm="using:AvaloniaApplication4.ViewModels"
  8. x:DataType="vm:MySubjectsViewModel"
  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 55" Text="Мои предметы" Classes="titleStyle" FontWeight="Bold"/>
  14. <ListBox ItemsSource="{Binding Subjects}">
  15. <ListBox.ItemTemplate>
  16. <DataTemplate>
  17. <Grid Margin="0 0 0 15">
  18. <Grid.ColumnDefinitions>
  19. <ColumnDefinition Width="3*"/>
  20. <ColumnDefinition Width="1*"/>
  21. </Grid.ColumnDefinitions>
  22. <TextBlock Grid.Column="0" Margin="10 0 0 0" Classes="mediumText" FontSize="24" VerticalAlignment="Center" HorizontalAlignment="Stretch" Text="{Binding IdSubjectNavigation.NameSubject}"/>
  23. <Button Grid.Column="1" Command="{Binding $parent[UserControl].((vm:MySubjectsViewModel)DataContext).GetCredit}" CommandParameter="{Binding Id}" Margin="0 0 10 0" Content="Просмотреть информацию" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
  24. </Grid>
  25. </DataTemplate>
  26. </ListBox.ItemTemplate>
  27. </ListBox>
  28. </StackPanel>
  29. </ScrollViewer>
  30. </UserControl>