1234567891011121314151617181920212223242526272829303132333435363738 |
- <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.Views.AddUserPage"
- x:DataType="vm:MainWindowViewModel"
- xmlns:conv="using:AvaloniaApplicationTestNew.Resources">
- <UserControl.Resources>
- <conv:DateConverter x:Key="myDateTimeOffset"/>
- </UserControl.Resources>
- <StackPanel VerticalAlignment="Center">
- <TextBox Watermark="Логин" Text="{Binding AddUserPageVM.NewLogined.Login}"/>
- <TextBox Watermark="Пароль" Text="{Binding AddUserPageVM.NewLogined.Password}"/>
- <ComboBox ItemsSource="{Binding AddUserPageVM.RoleList}" SelectedItem="{Binding AddUserPageVM.NewLogined.IdRoleNavigation}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding RoleName}" />
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <TextBox Watermark="Имя пользователя" Text="{Binding AddUserPageVM.NewUser.Name}"/>
- <DatePicker SelectedDate="{Binding AddUserPageVM.NewUser.BirthDate, Converter={StaticResource myDateTimeOffset}}"/>
- <ComboBox ItemsSource="{Binding AddUserPageVM.GendersList}" SelectedItem="{Binding AddUserPageVM.NewUser.IdGenderNavigation}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Gender1}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Button Content="Добавить изображение" Command="{Binding AddUserPageVM.Image}"/>
- <Button Content="Сохранить пользователя" Command="{Binding AddUserPageVM.CreateUser}"/>
- <Button Content="Назад" Command="{Binding AddUserPageVM.Back}"/>
- <TextBlock Text="{Binding AddUserPageVM.Message}" Foreground="Red"/>
- </StackPanel>
- </UserControl>
|