1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <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="AvaloniaApplication2.PageStartAdmin"
- xmlns:vm="using:AvaloniaApplication2.ViewModels"
- x:DataType="vm:PageStartAdminViewModel">
- <Grid RowDefinitions="70,*">
- <StackPanel Orientation="Horizontal" Grid.Row="0">
- <TextBlock Text="Поиск:"/>
- <TextBox Text="{Binding TextFind}" Watermark="Введите текст для поиска"/>
- <TextBlock Text="Сортировка по дате рождения:"/>
- <StackPanel>
- <RadioButton Content="По возрастанию" Command="{Binding DateSort}" CommandParameter="1"/>
- <RadioButton Content="По убыванию" Command="{Binding DateSort}" CommandParameter="2"/>
- </StackPanel>
- <TextBlock Text="Фильтр по полу"/>
- <ComboBox ItemsSource="{Binding Genders}" SelectedItem="{Binding FilteredGender}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Gender1}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </StackPanel>
- <ListBox ItemsSource="{Binding Users}" Grid.Row="1">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock Text="{Binding Name, StringFormat=Имя: {0}}"/>
- <TextBlock Text="{Binding BirthDate,StringFormat=Дата рождения: {0:dd/MM/yyyy}}"/>
- <TextBlock Text="{Binding IdGenderNavigation.Gender1, StringFormat=Пол: {0}}"/>
- <TextBlock Text="{Binding IdUserNavigation.IdRoleNavigation.RoleName, StringFormat=Роль в системе: {0}}"/>
- <Button Content="Изменить персональные данные пользователя" Command="{Binding $parent[UserControl].((vm:PageStartAdminViewModel)DataContext).Press}" CommandParameter="{Binding IdUser}"/>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </UserControl>
|