mekasu0124

Untitled

Mar 1st, 2024
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.28 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:Diary.ViewModels"
  6.             mc:Ignorable="d" d:DesignWidth="1500" d:DesignHeight="800"
  7.             x:Class="Diary.Views.CreateUserView"
  8.              x:DataType="vm:CreateUserViewModel"
  9.              Background="{Binding Background}">
  10.  
  11.     <Design.DataContext>
  12.         <vm:CreateUserViewModel />
  13.     </Design.DataContext>
  14.  
  15.     <UserControl.Styles>
  16.         <Style Selector="Border">
  17.             <Setter Property="BorderBrush" Value="#24de45" />
  18.             <Setter Property="BorderThickness" Value="2" />
  19.             <Setter Property="CornerRadius" Value="10" />
  20.             <Setter Property="Padding" Value="10" />
  21.             <Setter Property="Margin" Value="10" />
  22.         </Style>
  23.  
  24.         <Style Selector="Label">
  25.             <Setter Property="Foreground" Value="{Binding Foreground}" />
  26.             <Setter Property="FontSize" Value="{Binding FontSize}" />
  27.             <Setter Property="HorizontalAlignment" Value="{Binding TextAlign}" />
  28.             <Setter Property="VerticalAlignment" Value="{Binding TextAlign}" />
  29.             <Setter Property="HorizontalContentAlignment" Value="{Binding TextAlign}" />
  30.             <Setter Property="VerticalContentAlignment" Value="{Binding TextAlign}" />
  31.             <Setter Property="Margin" Value="0, 10, 0, 0" />
  32.             <Setter Property="BorderBrush" Value="{Binding Border}" />
  33.             <Setter Property="BorderThickness" Value="1" />
  34.             <Setter Property="Width" Value="550" />
  35.             <Setter Property="Height" Value="75" />
  36.             <Setter Property="Padding" Value="10" />
  37.             <Setter Property="CornerRadius" Value="20" />
  38.         </Style>
  39.  
  40.         <Style Selector="Label.CreateNewUserTitle">
  41.             <Setter Property="FontSize" Value="30" />
  42.             <Setter Property="FontWeight" Value="Bold" />
  43.         </Style>
  44.  
  45.         <Style Selector="Label.CategoryTitle">
  46.             <Setter Property="FontSize" Value="20" />
  47.             <Setter Property="BorderBrush" Value="Transparent" />
  48.         </Style>
  49.  
  50.         <Style Selector="Label.UserInput">
  51.             <Setter Property="FontSize" Value="{Binding FontSize}" />
  52.             <Setter Property="Width" Value="150" />
  53.             <Setter Property="Height" Value="70" />
  54.             <Setter Property="BorderBrush" Value="Transparent" />
  55.         </Style>
  56.  
  57.         <Style Selector="TextBox">
  58.             <Setter Property="CornerRadius" Value="20" />
  59.             <Setter Property="BorderBrush" Value="Transparent" />
  60.             <Setter Property="Background" Value="{Binding Background}" />
  61.             <Setter Property="Foreground" Value="{Binding Foreground}" />
  62.             <Setter Property="FontSize" Value="{Binding FontSize}" />
  63.             <Setter Property="HorizontalAlignment" Value="{Binding TextAlign}" />
  64.             <Setter Property="VerticalAlignment" Value="{Binding TextAlign}" />
  65.             <Setter Property="HorizontalContentAlignment" Value="{Binding TextAlign}" />
  66.             <Setter Property="VerticalContentAlignment" Value="{Binding TextAlign}" />
  67.             <Setter Property="Width" Value="350" />
  68.             <Setter Property="Height" Value="70" />
  69.  
  70.             <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
  71.                 <Setter Property="Background" Value="{Binding Background}" />
  72.             </Style>
  73.         </Style>
  74.  
  75.         <Style Selector="Button">
  76.             <Setter Property="Foreground" Value="{Binding Foreground}" />
  77.             <Setter Property="BorderBrush" Value="{Binding Border}" />
  78.             <Setter Property="BorderThickness" Value="1" />
  79.             <Setter Property="FontSize" Value="{Binding FontSize}" />
  80.             <Setter Property="FontStyle" Value="{Binding FontStyle}" />
  81.         </Style>
  82.     </UserControl.Styles>
  83.  
  84.     <Border>
  85.         <!-- Main Box -->
  86.         <Grid RowDefinitions="Auto, *, Auto" IsVisible="{Binding !IsVisible}">
  87.             <Label Grid.Row="0" Classes="CreateNewUserTitle" Content="{Binding Title}" />
  88.  
  89.             <!-- Inner Box -->
  90.             <Grid Grid.Row="1" ColumnDefinitions="*,*">
  91.                 <Border Grid.Column="0">
  92.                     <!-- Left Box -->
  93.                     <Grid RowDefinitions="Auto, *">
  94.                         <Label Classes="CategoryTitle" Content="General Information" Grid.Row="0" />
  95.  
  96.                         <Grid Grid.Row="1" ColumnDefinitions="Auto, *" RowDefinitions="*,*,*">
  97.                             <Label Classes="UserInput" Grid.Column="0" Grid.Row="0" Content="First Name:" />
  98.                             <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding FirstName}" Watermark="First Name" />
  99.                             <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding LastName}" Watermark="Last Name" />
  100.                             <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Email}" Watermark="Email Address" />
  101.                         </Grid>
  102.                     </Grid>
  103.                 </Border>
  104.  
  105.                 <Border Grid.Column="1">
  106.                     <!-- Right Box -->
  107.                     <Grid RowDefinitions="Auto, *">
  108.                         <Label Classes="CategoryTitle" Content="Account Information" Grid.Row="0" />
  109.  
  110.                         <Grid Grid.Row="1" ColumnDefinitions="Auto, *" RowDefinitions="*,*,*,*,*,*">
  111.                             <TextBox Grid.Row="0" Text="{Binding Username}" Watermark="Create Username" />
  112.                             <TextBox Grid.Row="1" Text="{Binding Password}" Watermark="Create Password" />
  113.                             <TextBox Grid.Row="2" Text="{Binding ConfirmPassword}" Watermark="Confirm Password" />
  114.                         </Grid>
  115.                     </Grid>
  116.                 </Border>
  117.             </Grid>
  118.  
  119.             <Grid Grid.Row="3" ColumnDefinitions="*,*">
  120.                 <Button Grid.Column="0" Content="Exit" Command="{Binding ExitCommand}" />
  121.                 <Button Grid.Column="1" Content="Next" Command="{Binding NextPageCommand}" />
  122.             </Grid>
  123.         </Grid>
  124.     </Border>
  125.    
  126.    
  127. </UserControl>
  128.  
Advertisement
Add Comment
Please, Sign In to add comment