Login Page UI Design
Three Login page Designs
Login page is the most important part of the any application(mobile, web, window). It take credential from user and check whether this user is registered or not, what credential does he have.
It should be very simple with no overloaded information and also easy to use.
Today we are going to learn three different designs of login.
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LoginUIDesigns.Views.Login.Design1"
Shell.NavBarIsVisible="False"
NavigationPage.HasNavigationBar="False"
BackgroundColor="#1C375C"
xmlns:fontawesome="clr-namespace:LoginUIDesigns.Models">
<ContentPage.Content>
<Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Image Grid.Row="0" Margin="0,30" Source="xamarinlogo.png" Aspect="AspectFit" HeightRequest="180" WidthRequest="80"> </Image>
<Frame Grid.Row="1" Margin="0,0,0,-40" BorderColor="#1C375C" HasShadow="True" CornerRadius="50" HeightRequest="700">
<Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" RowSpacing="20" Padding="20,50,20,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="Welcome Back!" FontSize="24" FontAttributes="Bold" TextColor="#1C375C" HorizontalOptions="CenterAndExpand"></Label>
<Label Grid.Row="1" Margin="0,-15,0,0" Text="Login in to account" TextColor="#1C375C" HorizontalOptions="CenterAndExpand"></Label>
<Entry Grid.Row="2" Placeholder="Username" Margin="0,20,0,0" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></Entry>
<Entry Grid.Row="3" Placeholder="Password" IsPassword="True" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></Entry>
<Button Grid.Row="4" Text="Login" BackgroundColor="#1C375C" CornerRadius="20"></Button>
<Label Grid.Row="5" Text="or signin with" HorizontalOptions="CenterAndExpand"></Label>
<StackLayout Grid.Row="6" Orientation="Horizontal" HorizontalOptions="CenterAndExpand" Spacing="40">
<Image Source="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSo626DNKJxdHM-VNRD0m7x_8Jim-r9kRalJQ" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
<Image Source="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRnLfAn36-LTYNHjioWgvu-0KUTIDDrW5lX_g" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
<Image Source="https://www.freepnglogos.com/uploads/google-logo-png/google-logo-icon-png-transparent-background-osteopathy-16.png" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
<Image Source="https://cdn-icons-png.flaticon.com/512/174/174857.png" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
</StackLayout>
<Label Grid.Row="7" Text="Forget Password" FontAttributes="Bold" HorizontalOptions="CenterAndExpand"></Label>
<Label Grid.Row="8" Margin="0,-10,0,0" Text="Don't have an account? Sign up here" HorizontalOptions="CenterAndExpand"></Label>
</Grid>
</Frame>
</Grid>
</ContentPage.Content>
</ContentPage>
.xaml code
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LoginUIDesigns.Views.Login.Design2"
Shell.NavBarIsVisible="False">
<ContentPage.Content>
<Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" RowSpacing="20" Padding="20,0,20,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<StackLayout Grid.Row="0" HeightRequest="250" Margin="-20,0" Padding="20" BackgroundColor="#1C375C" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Image Source="xamarinlogo.png" Aspect="AspectFit" HeightRequest="180" WidthRequest="80" VerticalOptions="CenterAndExpand"></Image>
</StackLayout>
<Label Grid.Row="1" Text="Welcome Back!" Margin="0,20,0,0" FontSize="24" FontAttributes="Bold" TextColor="#1C375C" HorizontalOptions="CenterAndExpand"></Label>
<Label Grid.Row="2" Margin="0,-15,0,0" Text="Login in to account" TextColor="#1C375C" HorizontalOptions="CenterAndExpand"></Label>
<Entry Grid.Row="3" Placeholder="Username" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></Entry>
<Entry Grid.Row="4" Placeholder="Password" IsPassword="True" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></Entry>
<Button Grid.Row="5" Text="Login" BackgroundColor="#1C375C" CornerRadius="20"></Button>
<Label Grid.Row="6" Text="or signin with" HorizontalOptions="CenterAndExpand"></Label>
<StackLayout Grid.Row="7" Orientation="Horizontal" HorizontalOptions="CenterAndExpand" Spacing="40">
<Image Source="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSo626DNKJxdHM-VNRD0m7x_8Jim-r9kRalJQ" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
<Image Source="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRnLfAn36-LTYNHjioWgvu-0KUTIDDrW5lX_g" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
<Image Source="https://www.freepnglogos.com/uploads/google-logo-png/google-logo-icon-png-transparent-background-osteopathy-16.png" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
<Image Source="https://cdn-icons-png.flaticon.com/512/174/174857.png" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
</StackLayout>
<Label Grid.Row="8" Text="Forget Password" FontAttributes="Bold" HorizontalOptions="CenterAndExpand"></Label>
<Label Grid.Row="9" Margin="0,-10,0,0" Text="Don't have an account? Sign up here" HorizontalOptions="CenterAndExpand"></Label>
</Grid>
</ContentPage.Content>
</ContentPage>
.xaml code
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LoginUIDesigns.Views.Login.Design3"
Shell.NavBarIsVisible="False">
<ContentPage.Content>
<StackLayout>
<Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" RowSpacing="20" Padding="20,0,20,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Path Grid.Row="0" Margin="-20,0" Data="m132.34,154.23002l209.00002,0l0,0.66666c-66.50001,28 -156.50001,72.87853 -209.00002,96.76573l0,-97.43239z"
Stroke="#1C375C" Fill="#1C375C" HeightRequest="220" Aspect="Fill" ></Path>
<Image Grid.Row="0" Margin="-18,-20,0,0" Source="xamarinlogo.png" Aspect="AspectFit" HeightRequest="180" WidthRequest="150" VerticalOptions="Start" HorizontalOptions="Start" ></Image>
<Label Grid.Row="1" Text="Welcome Back!" Margin="0,-50,0,0" FontSize="24" FontAttributes="Bold" TextColor="#1C375C" HorizontalOptions="CenterAndExpand"></Label>
<Label Grid.Row="2" Margin="0,-15,0,0" Text="Login in to account" TextColor="#1C375C" HorizontalOptions="CenterAndExpand"></Label>
<Entry Grid.Row="3" Placeholder="Username" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></Entry>
<Entry Grid.Row="4" Placeholder="Password" IsPassword="True" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></Entry>
<Button Grid.Row="5" Text="Login" BackgroundColor="#1C375C" CornerRadius="20"></Button>
<Label Grid.Row="6" Text="or signin with" HorizontalOptions="CenterAndExpand"></Label>
<StackLayout Grid.Row="7" Orientation="Horizontal" HorizontalOptions="CenterAndExpand" Spacing="40">
<Image Source="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSo626DNKJxdHM-VNRD0m7x_8Jim-r9kRalJQ" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
<Image Source="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRnLfAn36-LTYNHjioWgvu-0KUTIDDrW5lX_g" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
<Image Source="https://www.freepnglogos.com/uploads/google-logo-png/google-logo-icon-png-transparent-background-osteopathy-16.png" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
<Image Source="https://cdn-icons-png.flaticon.com/512/174/174857.png" WidthRequest="30"
HeightRequest="30" Aspect="AspectFit"></Image>
</StackLayout>
<Label Grid.Row="8" Text="Forget Password" FontAttributes="Bold" HorizontalOptions="CenterAndExpand"></Label>
<Label Grid.Row="9" Margin="0,-10,0,0" Text="Don't have an account? Sign up here" HorizontalOptions="CenterAndExpand"></Label>
<Path Grid.Row="10" Margin="-20,0" Data="m333.5114,204.27502l115.48359,-59l-0.00813,123.08816c-101.06176,0.76114 -113.03789,-0.51177 -246.99185,-0.49297l131.51639,-63.59519z"
Stroke="#1C375C" Fill="#1C375C" HeightRequest="143" Aspect="Fill" ></Path>
</Grid>
</StackLayout>
</ContentPage.Content>
</ContentPage>
Hey, thank you for the examples. It's very great and helpful for me who is a newbie in Xamarin Forms. Thanks again
ReplyDeleteThanks for your comment. this code is explain in https://www.youtube.com/watch?v=Ay51XR9A6O4.
DeleteIf you want any UI design let me know I will try to design that UI
Very Nice UI Design Good Job.. 😊
ReplyDeleteThanks for appreciation.
DeleteNice blog. Good information for beginners.
ReplyDeleteXamarin app development company
Mobile app development company Gurgaon
i whant code the xaml.cs
ReplyDeleteThis only UI design. it does not required xaml.cs
Delete