12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <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"/>
- <StackPanel>
- <TextBlock Text="Сортировка по имени"/>
- <ComboBox ItemsSource="{Binding OrdersName}" SelectedValue="{Binding OrderByName}"/>
- </StackPanel>
- <StackPanel>
- <TextBlock Text="Фильтр по полу"/>
- <ComboBox ItemsSource="{Binding Genders}" SelectedValue="{Binding FilterByGender}"/>
- </StackPanel>
- <StackPanel>
- <TextBlock Text="Поиск по имени"/>
- <TextBox />
- </StackPanel>
-
-
-
-
-
- </StackPanel>
- <ListBox Grid.Column="0" Grid.Row="1" ItemsSource="{Binding 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}"/>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <ContentControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Content="{Binding UCAdmin}"/>
- </Grid>
-
- </UserControl>
|