ShowCatsPage.axaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:vm="using:AvaloniaApplicationBase.ViewModels"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. x:DataType="vm:MainWindowViewModel"
  7. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  8. x:Class="AvaloniaApplicationBase.Views.ShowCatsPage">
  9. <Grid RowDefinitions="*,6*">
  10. <StackPanel>
  11. <Button Grid.Row="0" Command="{Binding NewCatPage}">Добавить кота</Button>
  12. <StackPanel Orientation="Horizontal">
  13. <TextBlock>сортировка по имени</TextBlock>
  14. <ComboBox ItemsSource="{Binding ShowCatsVM.OrdersName}" SelectedValue="{Binding ShowCatsVM.OrderByName}"></ComboBox>
  15. <TextBlock>Фильтр по полу</TextBlock>
  16. <ComboBox ItemsSource="{Binding ShowCatsVM.GenderList}" SelectedValue="{Binding ShowCatsVM.SelectedGender}"></ComboBox>
  17. <TextBlock>Поиск по имени</TextBlock>
  18. <TextBox Text="{Binding ShowCatsVM.NameFind}"></TextBox>
  19. </StackPanel>
  20. </StackPanel>
  21. <ListBox ItemsSource="{Binding ShowCatsVM.CT}" Grid.Row="1">
  22. <ListBox.ItemTemplate>
  23. <DataTemplate>
  24. <Border CornerRadius="5" BorderBrush="Violet" BorderThickness="2" Padding="15">
  25. <StackPanel>
  26. <TextBlock Text="{Binding Name}"></TextBlock>
  27. <TextBlock Text="{Binding Date}"></TextBlock>
  28. <TextBlock Text="{Binding GenderNavigation.Gender}"></TextBlock>
  29. <TextBlock Text="{Binding TraitsCats}"></TextBlock>
  30. </StackPanel>
  31. </Border>
  32. </DataTemplate>
  33. </ListBox.ItemTemplate>
  34. </ListBox>
  35. </Grid>
  36. </UserControl>