AdminPage.axaml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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="AvaloniaHomeTry.AdminPage"
  7. xmlns:vm="using:AvaloniaHomeTry.ViewModels"
  8. x:DataType="vm:AdminPageViewModel">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width= "*"/>
  12. <ColumnDefinition Width= "*"/>
  13. <ColumnDefinition Width= "*"/>
  14. <ColumnDefinition Width= "*"/>
  15. </Grid.ColumnDefinitions>
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height = "110"/>
  18. <RowDefinition Height = "*"/>
  19. <RowDefinition Height = "*"/>
  20. <RowDefinition Height = "*"/>
  21. </Grid.RowDefinitions>
  22. <StackPanel Grid.Row="0" Grid.Column="1" Margin="10" VerticalAlignment="Center">
  23. <TextBlock Text="Поиск"/>
  24. <TextBox Text="{Binding Find}" Watermark="Введите текст для поиска: "/>
  25. </StackPanel>
  26. <StackPanel Margin="10" Grid.Row="0" Grid.Column="0">
  27. <TextBlock Text="Сортировка по дате рождения"/>
  28. <RadioButton Content="По возростанию" Command="{Binding DateSort}" CommandParameter="1"/>
  29. <RadioButton Content="По убыванию" Command="{Binding DateSort}" CommandParameter="2"/>
  30. </StackPanel>
  31. <StackPanel Grid.Column="2" Margin="10" VerticalAlignment="Center">
  32. <TextBlock Text="Фильтр по полу" />
  33. <ComboBox ItemsSource="{Binding GenderList}" SelectedItem="{Binding FilterGender}">
  34. <ComboBox.ItemTemplate>
  35. <DataTemplate>
  36. <TextBlock Text="{Binding GenderName}"/>
  37. </DataTemplate>
  38. </ComboBox.ItemTemplate>
  39. </ComboBox>
  40. </StackPanel>
  41. <StackPanel Grid.Column="4" Margin="10" VerticalAlignment="Center">
  42. <Button Content="Мой профиль" Command="{Binding MyProfile}"/>
  43. </StackPanel>
  44. <ListBox Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="4">
  45. <ListBox ItemsSource="{Binding UsersTables}">
  46. <ListBox.ItemTemplate>
  47. <DataTemplate>
  48. <StackPanel>
  49. <TextBlock Text="{Binding Surname, StringFormat=Фамилия: {0}}" />
  50. <TextBlock Text="{Binding Firstname, StringFormat=Имя: {0}}" />
  51. <TextBlock Text="{Binding Patronymic, StringFormat=Отчество: {0}}" />
  52. <TextBlock Text="{Binding GenderNavigation.GenderName, StringFormat=Пол: {0}}" />
  53. <TextBlock Text="{Binding Dataofbirth, StringFormat=Дата рождения: {0:dd/MM/yyyy}}"/>
  54. </StackPanel>
  55. </DataTemplate>
  56. </ListBox.ItemTemplate>
  57. </ListBox>
  58. </ListBox>
  59. <Button Grid.ColumnSpan="4" Grid.Row="3" Command="{Binding Exit}" Content="Выход" HorizontalAlignment="Center" Margin="15"/>
  60. </Grid>
  61. </UserControl>