123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <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"
- xmlns:vm="using:AvaloniaApplication5.ViewModels"
- x:DataType="vm:MainWindowViewModel"
- x:Class="AvaloniaApplication5.Views.PageUserList">
- <Grid ColumnDefinitions="*,*" RowDefinitions="50,*">
- <StackPanel Orientation="Horizontal" Grid.Row="0">
- <!--<Button Content="Добавить пользователя" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).EditUser}" CommandParameter="0"/>-->
- <Button Content="Добавить пользователя" Command="{Binding EditUser}" CommandParameter="0"/>
- <StackPanel>
- <TextBlock Text="Сортировка по имени"/>
- <ComboBox ItemsSource="{Binding PageUserListViewVM.OrdersName}" SelectedValue="{Binding PageUserListViewVM.OrderByName}"/>
- </StackPanel>
- <StackPanel>
- <TextBlock Text="Фильтр по полу"/>
- <ComboBox ItemsSource="{Binding PageUserListViewVM.Genders}" SelectedValue="{Binding PageUserListViewVM.FilterByGender}"/>
- </StackPanel>
- <StackPanel>
- <TextBlock Text="Поиск по имени"/>
- <TextBox Text="{Binding PageUserListViewVM.Namefind}"/>
- </StackPanel>
-
-
-
-
-
- </StackPanel>
- <ListBox Grid.Column="0" Grid.Row="1" ItemsSource="{Binding PageUserListViewVM.UserList}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock Text="Имя"/>
- <TextBlock Text="{Binding User.Name}"/>
- <TextBlock Text="Логин"/>
- <TextBlock Text="{Binding Login}"/>
- <TextBlock Text="Роль в системе"/>
- <TextBlock Text="{Binding IdRoleNavigation.Role1}"/>
- <TextBlock Text="Пол"/>
- <TextBlock Text="{Binding User.IdGenderNavigation.Gender1}"/>
- <TextBlock Text="Дата рождения"/>
- <TextBlock Text="{Binding User.BirthDate}"/>
- <Button Content="Редактировать" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).EditUser}" CommandParameter="{Binding Id}"/>
- <Button Content="Удалить" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).DeleteUser}" CommandParameter="{Binding Id}"/>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <ContentControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Content="{Binding UCAdmin}"/>
- </Grid>
-
- </UserControl>
|