12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <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.MyPrograms"
- xmlns:vm="using:AvaloniaApplication4.ViewModels"
- x:DataType="vm:MyProgramsViewModel"
- Background="White"
- Padding="80">
- <ScrollViewer>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 20 0 0">
- <TextBlock Margin="0 0 0 34" Text="Доступные программы" Classes="titleStyle" FontWeight="Bold"/>
- <ListBox Margin="0 0 0 34" ItemsSource="{Binding ProgramsWithSubject}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock Margin="0 0 0 10" Text="{Binding Title}" Classes="mediumText" FontSize="24" FontWeight="Bold"/>
- <StackPanel Margin="0 0 0 34" Orientation="Horizontal">
- <TextBlock Margin="0 0 5 0" Text="Код программы: " Classes="mediumText"/>
- <TextBlock Text="{Binding Code}" Classes="mediumText"/>
- </StackPanel>
- <StackPanel Margin="0 0 0 10" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Stretch">
- <TextBox Text="{Binding SearchQuery,Mode=TwoWay}" TextWrapping="NoWrap" Height="52" Watermark="Найдите нужный предмет" Width="600" HorizontalAlignment="Stretch"/>
- <Button Height="52" Width="52" Margin="0 0 23 0">
- <Image Source="/Assets/Images/searchIcon.png"/>
- </Button>
- </StackPanel>
- <ListBox ItemsSource="{Binding SubjectsList}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Margin="0 0 0 15">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Classes="mediumText" FontSize="24" VerticalAlignment="Center" HorizontalAlignment="Stretch" Text="{Binding IdSubjectNavigation.NameSubject}"/>
- <Button HorizontalAlignment="Stretch" Grid.Column="1" Content="Просмотреть информацию" VerticalAlignment="Center" Command="{Binding $parent[UserControl].((vm:MyProgramsViewModel)DataContext).GetCredit}" CommandParameter="{Binding IdSubject}"/>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|