mekasu0124

Untitled

Oct 17th, 2023
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.44 KB | None | 0 0
  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:MeksMathGame.ViewModels"
  6.             mc:Ignorable="d" d:DesignWidth="1500" d:DesignHeight="850"
  7.             x:Class="MeksMathGame.Views.GameEngineView"
  8.              x:DataType="vm:GameEngineViewModel"
  9.              Background="{DynamicResource ResourceKey=Purple}">
  10.  
  11.     <Design.DataContext>
  12.         <vm:GameEngineViewModel />
  13.     </Design.DataContext>
  14.  
  15.     <UserControl.Styles>
  16.         <StyleInclude Source="/Styles/GameEngineStyles.axaml" />
  17.     </UserControl.Styles>
  18.  
  19.     <Grid RowDefinitions="*,Auto,*">
  20.         <!-- top label -->
  21.         <Grid RowDefinitions="Auto,Auto">
  22.             <Label Grid.Row="0" Classes="GameLabel" Content="{Binding GameText}" />
  23.             <Label Grid.Row="1" Classes="GameLabel" Content="{Binding ScoreInfo}" />
  24.         </Grid>
  25.  
  26.         <!-- Equation display-->
  27.         <Grid Grid.Row="1" RowDefinitions="*,*,*,*,*,*">
  28.             <Label Classes="NumberLabel"
  29.                    Grid.Row="0"
  30.                    Content="{Binding NumOne}"
  31.                    HorizontalContentAlignment="Right"
  32.                    Width="85"
  33.                    Margin="5,0,0,0"/>
  34.  
  35.             <Grid Grid.Row="1" ColumnDefinitions="Auto, Auto" HorizontalAlignment="Center">
  36.                 <Label Classes="OperationLabel"
  37.                        Grid.Column="0"
  38.                        Content="{Binding Operation}" />
  39.  
  40.                 <Label Classes="NumberLabel"
  41.                        Grid.Column="1"
  42.                        Content="{Binding NumTwo}"
  43.                        HorizontalContentAlignment="Right"
  44.                        Width="45"
  45.                        Margin="5,0,0,0"/>
  46.             </Grid>
  47.  
  48.             <Label Classes="GameLabel"
  49.                    Grid.Row="3"
  50.                    Content="----------------" />
  51.  
  52.             <TextBox Classes="Solution"
  53.                      Grid.Row="4"
  54.                      Text="{Binding Solution}" />
  55.  
  56.             <Label Classes="GameLabel"
  57.                    Grid.Row="5"
  58.                    Content="{Binding WinLoseText}"
  59.                    IsVisible="{Binding IsVisible}"/>
  60.         </Grid>
  61.  
  62.         <!-- Submit buttons -->
  63.         <Grid Grid.Row="2" ColumnDefinitions="*,*,*">
  64.             <Button Classes="GameButton"
  65.                     Grid.Column="0"
  66.                     Content="Back To Home"
  67.                     Command="{Binding GoHome}"/>
  68.             <Button Classes="GameButton"
  69.                     Grid.Column="1"
  70.                     Content="Submit"
  71.                     Command="{Binding Submit}"/>
  72.             <Button Classes="GameButton"
  73.                     Grid.Column="2"
  74.                     Content="Next Question"
  75.                     Command="{Binding NextQuestion}"
  76.                     IsVisible="{Binding IsVisible}"/>
  77.         </Grid>
  78.     </Grid>
  79. </UserControl>
  80.  
Add Comment
Please, Sign In to add comment