Page2.axaml 1.4 KB

123456789101112131415161718192021222324252627282930313233
  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. xmlns:vm="using:AvaloniaApplication4.ViewModels"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="AvaloniaApplication4.Page2">
  9. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
  10. <TextBlock Text="Выберите арифметическую операцию" />
  11. <ComboBox Name="cm" ItemsSource="{Binding Page2VM.funclis}" SelectedItem="{Binding Page2VM.Selectedfunc}" Width="260"/>
  12. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="10">
  13. <TextBox Width="70" Text="{Binding Page2VM.Num1}"> </TextBox>
  14. <TextBlock FontSize="25" Margin="20 0 20 0" Text="{Binding Page2VM.Symb}"></TextBlock>
  15. <TextBox Width="70" Text="{Binding Page2VM.Num2}"> </TextBox>
  16. </StackPanel>
  17. <Button Width="250" Command="{Binding Page2VM.Calculate}">
  18. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">
  19. Рассчитать
  20. </TextBlock>
  21. </Button>
  22. <TextBlock>Результат:</TextBlock>
  23. <TextBlock Text="{Binding Page2VM.Result}" > </TextBlock>
  24. </StackPanel>
  25. </UserControl>