Calculator.axaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  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. xmlns:vm="using:AuthAndCaptcha.ViewModels"
  6. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  7. x:Class="AuthAndCaptcha.Calculator"
  8. x:DataType="vm:MainWindowViewModel">
  9. <Grid>
  10. <StackPanel>
  11. <StackPanel Classes="calcOptionSP">
  12. <TextBlock>Выберите арифметическую операцию:</TextBlock>
  13. <StackPanel Classes="calcOptionSP">
  14. <ComboBox Classes="calcCB" ItemsSource="{Binding CalculatorVM.calcOptions}" SelectedItem="{Binding CalculatorVM.SelectedOption}">
  15. </ComboBox>
  16. </StackPanel>
  17. </StackPanel>
  18. <StackPanel Classes="cellsForCalcSP">
  19. <TextBox Text="{Binding CalculatorVM.N}" Classes="cellsForCalcTB"></TextBox>
  20. <TextBlock Classes="calcSymTB" Text="{Binding CalculatorVM.Sign}"></TextBlock>
  21. <TextBox Text="{Binding CalculatorVM.M}" Classes="cellsForCalcTB"></TextBox>
  22. </StackPanel>
  23. <StackPanel Classes="calcOptionSP">
  24. <Button Classes="calcBut" Command="{Binding CalculatorVM.Calculation}">Вычислить</Button>
  25. </StackPanel>
  26. <StackPanel Classes="calcOptionSP">
  27. <TextBlock Text="Результат"></TextBlock>
  28. <TextBlock Text="{Binding CalculatorVM.Result}"></TextBlock>
  29. </StackPanel>
  30. </StackPanel>
  31. </Grid>
  32. </UserControl>