mekasu0124

Untitled

Oct 18th, 2023
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.90 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="800" d:DesignHeight="450"
  7.             x:Class="MeksMathGame.Views.SelectUserView"
  8.              x:DataType="vm:SelectUserViewModel"
  9.              Background="{DynamicResource ResourceKey=Purple}">
  10.  
  11.     <Design.DataContext>
  12.         <vm:SelectUserViewModel />
  13.     </Design.DataContext>
  14.  
  15.     <UserControl.Styles>
  16.         <StyleInclude Source="/Styles/SelectUserStyle.axaml" />
  17.     </UserControl.Styles>
  18.  
  19.     <Grid ColumnDefinitions="*,*">
  20.         <Border Grid.Column="0" Classes="SelectUserBorder">
  21.             <Grid RowDefinitions="*,*,*">
  22.                 <Label Classes="SelectUserLabel" Grid.Row="0" Content="Select A Username"/>
  23.  
  24.                 <ComboBox Classes="SelectUserCombo" Grid.Row="1" SelectedItem="{Binding SelectedUsername}"
  25.                             ItemsSource="{Binding CurrentUsers}" />
  26.  
  27.                 <Button Classes="SelectUserButton" Grid.Row="3" Content="Login" Command="{Binding SendSelectUser}" />
  28.             </Grid>
  29.         </Border>
  30.  
  31.         <Border Grid.Column="1" Classes="SelectUserBorder">
  32.             <Grid RowDefinitions="*,*,*">
  33.                 <Label Classes="SelectUserLabel" Grid.Row="0" Content="Create A New User" />
  34.  
  35.                 <TextBox Classes.SelectedUserInput="{Binding IsValid}"
  36.                             Classes.Wrong="{Binding !IsValid}"
  37.                             Grid.Row="1"
  38.                             Text="{Binding NewUser}" />
  39.  
  40.                 <Label Classes.Wrong="{Binding !IsValid}"
  41.                         Grid.Row="2"
  42.                         Content="That Username Already Exists!"
  43.                         IsVisible="{Binding !IsValid}"/>
  44.  
  45.                 <Button Classes="SelectUserButton"
  46.                         Grid.Row="2"
  47.                         Content="Create User"
  48.                         Command="{Binding SendNewUser}"
  49.                         IsVisible="{Binding IsValid}" />
  50.             </Grid>
  51.         </Border>
  52.     </Grid>
  53. </UserControl>
  54.  
Advertisement
Add Comment
Please, Sign In to add comment