PageStartAdmin.axaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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="AvaloniaApplication2.PageStartAdmin"
  7. xmlns:vm="using:AvaloniaApplication2.ViewModels"
  8. x:DataType="vm:PageStartAdminViewModel">
  9. <Grid RowDefinitions="70,*">
  10. <StackPanel Orientation="Horizontal" Grid.Row="0">
  11. <TextBlock Text="Поиск:"/>
  12. <TextBox Text="{Binding TextFind}" Watermark="Введите текст для поиска"/>
  13. <TextBlock Text="Сортировка по дате рождения:"/>
  14. <StackPanel>
  15. <RadioButton Content="По возрастанию" Command="{Binding DateSort}" CommandParameter="1"/>
  16. <RadioButton Content="По убыванию" Command="{Binding DateSort}" CommandParameter="2"/>
  17. </StackPanel>
  18. <TextBlock Text="Фильтр по полу"/>
  19. <ComboBox ItemsSource="{Binding Genders}" SelectedItem="{Binding FilteredGender}">
  20. <ComboBox.ItemTemplate>
  21. <DataTemplate>
  22. <TextBlock Text="{Binding Gender1}"/>
  23. </DataTemplate>
  24. </ComboBox.ItemTemplate>
  25. </ComboBox>
  26. </StackPanel>
  27. <ListBox ItemsSource="{Binding Users}" Grid.Row="1">
  28. <ListBox.ItemTemplate>
  29. <DataTemplate>
  30. <StackPanel>
  31. <TextBlock Text="{Binding Name, StringFormat=Имя: {0}}"/>
  32. <TextBlock Text="{Binding BirthDate,StringFormat=Дата рождения: {0:dd/MM/yyyy}}"/>
  33. <TextBlock Text="{Binding IdGenderNavigation.Gender1, StringFormat=Пол: {0}}"/>
  34. <TextBlock Text="{Binding IdUserNavigation.IdRoleNavigation.RoleName, StringFormat=Роль в системе: {0}}"/>
  35. <Button Content="Изменить персональные данные пользователя" Command="{Binding $parent[UserControl].((vm:PageStartAdminViewModel)DataContext).Press}" CommandParameter="{Binding IdUser}"/>
  36. </StackPanel>
  37. </DataTemplate>
  38. </ListBox.ItemTemplate>
  39. </ListBox>
  40. </Grid>
  41. </UserControl>