Courses.axaml 1.4 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="800" d:DesignHeight="450"
  6. x:Class="pr13.Courses"
  7. x:DataType="vm:MainWindowViewModel"
  8. xmlns:vm="using:pr13.ViewModels">
  9. <Grid RowDefinitions="*,8*">
  10. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  11. <ComboBox Width="150" SelectedItem="{Binding CourseVM.SelectedNameOrHour}" ItemsSource="{Binding CourseVM.OrderNameOrHours}"/>
  12. <ComboBox Width="150" SelectedItem="{Binding CourseVM.SelectedFilter}" ItemsSource="{Binding CourseVM.FilterByHours}"/>
  13. <TextBox Width="300" Text="{Binding CourseVM.NameOrHoursFind}" Watermark="Название курса или часы"></TextBox>
  14. </StackPanel>
  15. <ListBox ItemsSource="{Binding CourseVM.Courses}" Grid.Row="1">
  16. <ListBox.ItemTemplate>
  17. <DataTemplate>
  18. <StackPanel>
  19. <TextBlock Text="{Binding Course1}"></TextBlock>
  20. <TextBlock Text="{Binding HoursCount}"></TextBlock>
  21. <TextBlock Text="{Binding CountTeachers}"></TextBlock>
  22. </StackPanel>
  23. </DataTemplate>
  24. </ListBox.ItemTemplate>
  25. </ListBox>
  26. </Grid>
  27. </UserControl>