123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <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:TestRepeat.ViewModels"
- x:DataType="vm:InfoUsersDateViewModel"
- x:Class="TestRepeat.Views.InfoUsersDate">
- <Grid RowDefinitions="100, *">
- <StackPanel
- Orientation="Horizontal">
- <TextBlock
- Text="Поиск в базе:"/>
- <TextBox
- Text="{Binding TextFolderContent}"
- Watermark="Поиск"/>
- <TextBlock
- Text="Сортировка по дате рождения:"/>
- <StackPanel>
- <RadioButton
- Content="По убывания"
- CommandParameter="1"
- Command="{Binding DateSort}"/>
- <RadioButton
- Content="По возрастанию"
- CommandParameter="2"
- Command="{Binding DateSort}"/>
- </StackPanel>
- <TextBlock
- Text="Фильтр по полу"/>
- <ComboBox
- ItemsSource="{Binding ListGenders}"
- SelectedItem="{Binding SelectedGender}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock
- Text="{Binding Gender1}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Button
- Content="Создать пользователя"
- Command="{Binding AddNewUser}"/>
- </StackPanel>
- <ListBox
- Grid.Row="1"
- ItemsSource="{Binding ListUsers}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid
- ColumnDefinitions="*, *"
- ShowGridLines="True">
- <StackPanel
- Grid.Column="0">
- <TextBlock
- Text="{Binding Name}"/>
- <TextBlock
- Text="{Binding BirthDate, StringFormat=Дата рождения: {0: dd/MM/yyyy}}"/>
- <TextBlock
- Text="{Binding IdGenderNavigation.Gender1}"/>
- <TextBlock
- Text="{Binding IdUserNavigation.IdRoleNavigation.RoleName}"/>
- <Button
- Command="{Binding $parent[UserControl].((vm:InfoUsersDateViewModel)DataContext).ChangeUserDate}"
- Content="Изменить данные пользователя"
- CommandParameter="{Binding IdUser}"/>
- <Button
- Command="{Binding $parent[UserControl].((vm:InfoUsersDateViewModel)DataContext).DeleteUser}"
- Content="Удалить пользователя"
- CommandParameter="{Binding IdUser}"
- IsVisible="{Binding IsCanseled}"
- />
- </StackPanel>
- <Grid
- ColumnDefinitions="*, *"
- Grid.Column="1"
- ShowGridLines="True">
- <ListBox
- ItemsSource="{Binding IdThreats}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <TextBlock
- Text="{Binding Name}"/>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <Image
- Grid.Column="1"
- Source="{Binding ConvertImgUser}"
- Width="150"
- Height="150"/>
- </Grid>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </UserControl>
|