Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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="using:Diary.ViewModels"
- mc:Ignorable="d" d:DesignWidth="1500" d:DesignHeight="850"
- x:Class="Diary.Views.LoginView"
- x:DataType="vm:LoginViewModel"
- Background="{Binding Background}">
- <Design.DataContext>
- <vm:LoginViewModel />
- </Design.DataContext>
- <UserControl.Styles>
- <Style Selector="Border">
- <Setter Property="BorderBrush" Value="{Binding Border}" />
- <Setter Property="BorderThickness" Value="2" />
- <Setter Property="CornerRadius" Value="10" />
- <Setter Property="Padding" Value="10" />
- </Style>
- <Style Selector="Label">
- <Setter Property="Foreground" Value="{Binding Foreground}" />
- <Setter Property="FontSize" Value="{Binding FontSize}" />
- <Setter Property="FontFamily" Value="{Binding FontFamily}" />
- <Setter Property="FontStyle" Value="{Binding FontStyle}" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
- <Style Selector="Label.Error">
- <Setter Property="Foreground" Value="DarkRed" />
- <Setter Property="FontSize" Value="12" />
- <Setter Property="FontFamily" Value="Times New Roman" />
- <Setter Property="FontStyle" Value="Normal" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="BorderBrush" Value="DarkRed" />
- <Setter Property="BorderThickness" Value="2" />
- <Setter Property="CornerRadius" Value="20" />
- <Setter Property="Background" Value="Red" />
- </Style>
- <Style Selector="MaskedTextBox">
- <Setter Property="Foreground" Value="{Binding Foreground}" />
- <Setter Property="Background" Value="{Binding Background}" />
- <Setter Property="FontSize" Value="{Binding FontSize}" />
- <Setter Property="FontFamily" Value="{Binding FontFamily}" />
- <Setter Property="FontStyle" Value="{Binding FontStyle}" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- </Style>
- <Style Selector="Button">
- <Setter Property="Foreground" Value="{Binding Foreground}" />
- <Setter Property="Background" Value="{Binding Background}" />
- <Setter Property="BorderBrush" Value="{Binding Border}" />
- <Setter Property="FontSize" Value="{Binding FontSize}" />
- <Setter Property="FontFamily" Value="{Binding FontFamily}" />
- <Setter Property="FontStyle" Value="{Binding FontStyle}" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="CornerRadius" Value="20" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Width" Value="300" />
- <Setter Property="Height" Value="70" />
- <Setter Property="Margin" Value="0,0,0,10" />
- <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
- <Setter Property="Foreground" Value="{Binding Foreground}" />
- <Setter Property="Background" Value="{Binding Background}" />
- <Setter Property="BorderBrush" Value="{Binding Border}" />
- <Setter Property="CornerRadius" Value="20" />
- <Setter Property="BorderThickness" Value="1" />
- </Style>
- </Style>
- </UserControl.Styles>
- <Border>
- <Grid RowDefinitions="*,*,*">
- <Grid Grid.Row="0" ColumnDefinitions="Auto, *">
- <Label Grid.Column="0" Content="Username" />
- <TextBox Grid.Column="1" Text="{Binding Username}" />
- </Grid>
- <Grid Grid.Row="1" ColumnDefinitions="Auto, *">
- <Label Grid.Column="0" Content="Password" />
- <MaskedTextBox Grid.Column="1" Text="{Binding Password}" />
- </Grid>
- <Grid Grid.Row="2" RowDefinitions="*, Auto">
- <Label Classes="Error" Grid.Row="0" Content="{Binding ErrorText}" IsVisible="{Binding IsVisible}" />
- <Grid Grid.Row="1" ColumnDefinitions="*, *">
- <Button Grid.Column="0" Content="Exit" Command="{Binding Exit}" />
- <Button Grid.Column="1" Content="Login" Command="{Binding Login}" />
- </Grid>
- </Grid>
- </Grid>
- </Border>
- </UserControl>
Advertisement
Add Comment
Please, Sign In to add comment