1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:vm="using:AvaloniaApplicationTestNew.ViewModels"
- 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="AvaloniaApplicationTestNew.AdminPage"
- x:DataType="vm:AdminPageViewModel">
- <Grid RowDefinitions="75,50,*" ColumnDefinitions="*,*,*">
- <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="0 10 0 10">
- <TextBlock Text="Поиск:"/>
- <TextBox Text="{Binding FindText}" Watermark="Введите текст для поиска"/>
- <TextBlock Text="Сортировка по дате рождения:"/>
- <StackPanel>
- <RadioButton Content="По возрастанию" Command="{Binding SortDate}" CommandParameter="1"/>
- <RadioButton Content="По Убыванию" Command="{Binding SortDate}" CommandParameter="2"/>
- </StackPanel>
- <TextBlock Text="Фильтр по полу:"/>
- <ComboBox ItemsSource="{Binding Genders}" SelectedItem="{Binding FiltGendr}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Gender1}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </StackPanel>
- <StackPanel Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Center" Orientation="Horizontal">
- <Button Content="Добавить пользователя" Command="{Binding AddUser}"/>
- <Button Content="Выйти" Command="{Binding Exit}"/>
- </StackPanel>
- <ListBox ItemsSource="{Binding LocalListusers}" Grid.Row="2" Background="Linen" Grid.ColumnSpan="3">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <StackPanel Grid.Column="1">
- <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:AdminPageViewModel)DataContext).InfoUsers}" CommandParameter="{Binding IdUser}"/>
- </StackPanel>
- <ListBox ItemsSource="{Binding IdTraits}" Grid.Column="2" Grid.Row="2">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Traitname}"/>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <Image Source="{Binding ConvertImage}" Width="150" Height="150" Grid.Row="2" Grid.Column="3"/>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </UserControl>
|