12345678910111213141516171819202122232425262728293031 |
- <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"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:Class="task5_avalonia_mvvm_start.CalculatorView"
- x:DataType="vm:MainWindowViewModel"
- xmlns:vm="using:task5_avalonia_mvvm_start.ViewModels">
- <Grid>
- <StackPanel Classes="spBackground">
- <TextBlock Classes="headerCalc" Text="Выберите арифметическую операцию"></TextBlock>
- <StackPanel Classes="spAriphmetic">
- <ComboBox Classes="cbAriphm" ItemsSource="{Binding CalculatorVM.OperationsList}" SelectedItem="{Binding CalculatorVM.SelectedOperation}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Name}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <StackPanel Classes="spNums" Orientation="Horizontal">
- <TextBox Classes="tbNum" Text="{Binding CalculatorVM.Num1}"></TextBox>
- <TextBlock Classes="tbNum" Text="{Binding CalculatorVM.SelectedSign}"></TextBlock>
- <TextBox Classes="tbNum" Text="{Binding CalculatorVM.Num2}"></TextBox>
- </StackPanel>
- </StackPanel>
- <Button Classes="bCalc" Command="{Binding CalculatorVM.ToCalculate}">Вычислить</Button>
- <TextBlock Classes="headerCalc">Результат:</TextBlock>
- <TextBlock Classes="footerCalc" Text="{Binding CalculatorVM.Result}"></TextBlock>
- </StackPanel>
- </Grid>
- </UserControl>
|