123456789101112131415161718192021222324252627 |
- <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"
- xmlns:vm="clr-namespace:shkola.ViewModels"
- x:DataType="vm:MainWindowViewModel"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:Class="shkola.kalkulator">
- <StackPanel VerticalAlignment="Center" Margin="15">
- <TextBlock HorizontalAlignment="Center" FontSize="20">Калькулятор</TextBlock>
- <TextBlock Margin="0 15 0 0" HorizontalAlignment="Center">Выберите то что хотите сделать:</TextBlock>
- <ComboBox SelectedIndex="{Binding CP.Func}" Margin="0 5 0 0" HorizontalAlignment="Center" Width="400">
- <ComboBoxItem>Сложение</ComboBoxItem>
- <ComboBoxItem>Вычитание</ComboBoxItem>
- <ComboBoxItem>Умножение</ComboBoxItem>
- <ComboBoxItem>Деление</ComboBoxItem>
- </ComboBox>
- <TextBox Width="400" Margin="0 10 0 0" Text="{Binding CP.FirstArg}" TextAlignment="Center" Watermark="Число один"/>
- <TextBlock Width="50"></TextBlock>
- <TextBox Width="400" Text="{Binding CP.SecondArg}" TextAlignment="Center" Watermark="Число два"/>
- <Button Command="{Binding CP.ResultCalc}" Margin="0 10 0 0" HorizontalAlignment="Center" Width="400">Результат</Button>
- <Border Margin="0 10 0 0" Width="400" Height="30" BorderBrush="#393E46" BorderThickness="1" CornerRadius="3">
- <TextBlock TextAlignment="Center" Text="{Binding CP.Result}"></TextBlock>
- </Border>
- </StackPanel>
- </UserControl>
|