We can also use nested Stack Layout depending on our requirements.
We can design beautiful Screens by using the Stack Layout. If you're familiar with the Microsoft XAML for UWP and WPF where we used the StackPanel then you could easily understand the Stack Layout as well.
Let's design a Login Screen by using Stack Layout and from that you'll get a clear point of how to use that control in xamarin forms.
So let's Add a few lines of XAML code in the Content Page. Let's create a beautiful Skype Login Page with the Stack Layout so let's switch to Visual Studio Or Xamarin Studio and add few lines of code there.
By default the orientation of StackLayout is Vertical but if you want the horizontal fashion of Stack Layout then you can easily do that by simply adding an Orientation = "Horizontal" in the Stack Layout .
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:XF_Blogger"
x:Class="XF_Blogger.MainPage" BackgroundColor="#00aff0">
<StackLayout Margin="15,50,15,0">
<Image Source="skype.png" VerticalOptions="Center" HorizontalOptions="Center"/>
<StackLayout VerticalOptions="Center">
<Entry BackgroundColor="White" Placeholder="Enter Skype ID" PlaceholderColor="Gray"/>
<Entry BackgroundColor="White" Placeholder="Password" PlaceholderColor="Gray"/>
<Button BackgroundColor="#078fc1" Text="Sign In"/>
<Label Text="Problems signing in?" HorizontalTextAlignment="Center"></Label>
</StackLayout>
</StackLayout>
</ContentPage>
Now let's run this on the simulator or real device and just look at your UI for Login screen.
WOW ... Amazing it seems that we've almost design the same kinda Login Page in Xamarin Forms by just using the XAML.
Woah!! Such a piece of the nice information you have shared here, I have read the entire post and I must say that the information is very helpful for me.
ReplyDeleteXamarin Development services in Indore
The article was absolutely fantastic! Lot of great information which can be helpful in some or the other way. Keep updating the blog, looking forward for more contents.
ReplyDeleteby cloudi5 is the web development company in coimbatore
Thank you for taking the time to create such a detailed piece. Your blog is not only instructive, but also quite creative.
ReplyDeleteweb design development companies
ReplyDeleteArena Infosolution is a leading Website development company in Jaipur , specializing in custom website development, e-commerce solutions, and web application development. They have a team of highly skilled developers who can create visually appealing and user-friendly websites.
This comment has been removed by the author.
ReplyDeleteEngaging and insightful, this blog post really resonated with me! Well done on delivering valuable content.
ReplyDeleteBest Dental Clinic in India
Orthodontist Treatment and Braces Treatment in Mumbai
Dental Tourism in India
Dental Implants in Mumbai
Dental Clinic in Mumbai