123456789101112131415161718192021222324252627282930313233 |
- <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="800" d:DesignHeight="450"
- x:Class="AvaloniaApplication1.CoursesList"
- x:DataType="vm:MainWindowViewModel"
- xmlns:vm="using:AvaloniaApplication1.ViewModels"
- >
- <Grid RowDefinitions="*,6*">
- <StackPanel Orientation="Horizontal">
- <ComboBox Margin="10,0,0,0" Width="150" SelectedItem="{Binding CourseVM.SelectedNameOrHour}" ItemsSource="{Binding CourseVM.OrderNameOrHours}"/>
- <ComboBox Margin="10,0,0,0" Width="150" SelectedItem="{Binding CourseVM.SelectedFilter}" ItemsSource="{Binding CourseVM.FilterByHours}"/>
- <TextBox Margin="100,0,0,0" Width="300" Text="{Binding CourseVM.NameOrHoursFind}" Watermark="Поиск по имени или количеству часов"></TextBox>
- </StackPanel>
-
- <ListBox ItemsSource="{Binding CourseVM.Courses}" Grid.Row="1">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border CornerRadius="4" BorderBrush="DarkGreen" BorderThickness="1" Padding="15">
- <StackPanel>
- <TextBlock Text="{Binding Course1}"></TextBlock>
- <TextBlock Text="{Binding HoursCount}"></TextBlock>
- <TextBlock Text="{Binding CountTeachers}"></TextBlock>
- </StackPanel>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
-
- </UserControl>
|