Page2.axaml 1.1 KB

123456789101112131415161718192021222324
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  6. x:Class="AvaloniaApplication2.Page2"
  7. xmlns:vm="using:AvaloniaApplication2.ViewModels"
  8. x:DataType="vm:MainWindowViewModel">
  9. <StackPanel>
  10. <TextBox Text="{Binding Page2VM.EditedUser.Name}"/>
  11. <TextBox Text="{Binding Page2VM.EditedUser.BirthDate}"/>
  12. <DatePicker SelectedDate="{Binding Page2VM.DateTimeOffset}"/>
  13. <ComboBox ItemsSource="{Binding Page2VM.GendersList}" SelectedItem="{Binding Page2VM.EditedUser.IdGenderNavigation}">
  14. <ComboBox.ItemTemplate>
  15. <DataTemplate>
  16. <TextBlock Text="{Binding Gender1}"/>
  17. </DataTemplate>
  18. </ComboBox.ItemTemplate>
  19. </ComboBox>
  20. <Button Content="Сохранить изменения" Command="{Binding Page2VM.Save}"/>
  21. <Button Content="Развойти обратно" Command="{Binding Page2VM.GoBack}"/>
  22. </StackPanel>
  23. </UserControl>