Removing spacing between Xamarin.Forms Grid Cells - xamarin

I am struggling with removing spacing between grid cells. I have tried using ColumnSpacing="0" and RowSpacing = "0",however it does not make grid spaceless.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinPradmenys.CalculatorPage">
<AbsoluteLayout>
<StackLayout AbsoluteLayout.LayoutBounds="0,0,1,0.25" AbsoluteLayout.LayoutFlags="All" >
<Label x:Name="live" FontSize="20"/>
<Label x:Name="rez" FontSize="15"/>
</StackLayout>
<Grid RowSpacing="0" ColumnSpacing="0" AbsoluteLayout.LayoutBounds="0,1,1,0.75" AbsoluteLayout.LayoutFlags="All">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Grid.Row="0" Text="mc" />
<Button Grid.Column="1" Grid.Row="0" Text="m+"/>
<Button Grid.Column="2" Grid.Row="0" Text="m-"/>
<Button Grid.Column="3" Grid.Row="0" Text="mr"/>
<Button Grid.Column="0" Grid.Row="1" Text="C"/>
<Button Grid.Column="1" Grid.Row="1" Text="/"/>
<Button Grid.Column="2" Grid.Row="1" Text="X"/>
<Button Grid.Column="3" Grid.Row="1" Text="Del"/>
<Button Grid.Column="0" Grid.Row="2" Text="7"/>
<Button Grid.Column="1" Grid.Row="2" Text="8"/>
<Button Grid.Column="2" Grid.Row="2" Text="9"/>
<Button Grid.Column="3" Grid.Row="2" Text="-"/>
<Button Grid.Column="0" Grid.Row="3" Text="4"/>
<Button Grid.Column="1" Grid.Row="3" Text="5"/>
<Button Grid.Column="2" Grid.Row="3" Text="6"/>
<Button Grid.Column="3" Grid.Row="3" Text="+"/>
<Button Grid.Column="0" Grid.Row="4" Text="1"/>
<Button Grid.Column="1" Grid.Row="4" Text="2"/>
<Button Grid.Column="2" Grid.Row="4" Text="3"/>
<Button Grid.Column="3" Grid.Row="4" Grid.RowSpan="2" Text="="/>
<Button Grid.Column="0" Grid.Row="5" Text="%" />
<Button Grid.Column="1" Grid.Row="5" Text="0"/>
<Button Grid.Column="2" Grid.Row="5" Text=","/>
</Grid>
</AbsoluteLayout>
</ContentPage>
That I get is:
As you can see there are spaces between every row and column. Do you have any suggestions?
Do you have anything what could help me?

Because material design, each button has shadows but if you add a background colour, you'll see its true size :
Code
<Page.Resources>
<Style TargetType="Button">
<Setter Property="BackgroundColor" Value="#d6d7d7" />
</Style>
</Page.Resources>
<AbsoluteLayout>
<StackLayout AbsoluteLayout.LayoutBounds="0,0,1,0.25" AbsoluteLayout.LayoutFlags="All">
<Label x:Name="live" FontSize="20" />
<Label x:Name="rez" FontSize="15" />
</StackLayout>
<Grid
AbsoluteLayout.LayoutBounds="0,1,1,0.75"
AbsoluteLayout.LayoutFlags="All"
ColumnSpacing="0"
RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button
Grid.Row="0"
Grid.Column="0"
Text="mc" />
<Button
Grid.Row="0"
Grid.Column="1"
Text="m+" />
<Button
Grid.Row="0"
Grid.Column="2"
Text="m-" />
<Button
Grid.Row="0"
Grid.Column="3"
Text="mr" />
<Button
Grid.Row="1"
Grid.Column="0"
Text="C" />
<Button
Grid.Row="1"
Grid.Column="1"
Text="/" />
<Button
Grid.Row="1"
Grid.Column="2"
Text="X" />
<Button
Grid.Row="1"
Grid.Column="3"
Text="Del" />
<Button
Grid.Row="2"
Grid.Column="0"
Text="7" />
<Button
Grid.Row="2"
Grid.Column="1"
Text="8" />
<Button
Grid.Row="2"
Grid.Column="2"
Text="9" />
<Button
Grid.Row="2"
Grid.Column="3"
Text="-" />
<Button
Grid.Row="3"
Grid.Column="0"
Text="4" />
<Button
Grid.Row="3"
Grid.Column="1"
Text="5" />
<Button
Grid.Row="3"
Grid.Column="2"
Text="6" />
<Button
Grid.Row="3"
Grid.Column="3"
Text="+" />
<Button
Grid.Row="4"
Grid.Column="0"
Text="1" />
<Button
Grid.Row="4"
Grid.Column="1"
Text="2" />
<Button
Grid.Row="4"
Grid.Column="2"
Text="3" />
<Button
Grid.Row="4"
Grid.RowSpan="2"
Grid.Column="3"
Text="=" />
<Button
Grid.Row="5"
Grid.Column="0"
Text="%" />
<Button
Grid.Row="5"
Grid.Column="1"
Text="0" />
<Button
Grid.Row="5"
Grid.Column="2"
Text="," />
</Grid>
</AbsoluteLayout>

You could do this via custom renderer.
MyButton.cs
public class MyButton : Button
{
}
MyButtonRenderer.cs
[assembly: ExportRenderer(typeof(MyButton), typeof(MyButtonRenderer))]
namespace XamarinDemo.Droid
{
public class MyButtonRenderer : Xamarin.Forms.Platform.Android.AppCompat.ButtonRenderer
{
public MyButtonRenderer(Context context) : base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Button> e)
{
base.OnElementChanged(e);
if (Control != null)
{
Control.Background = null;
Control.SetBackgroundColor(Android.Graphics.Color.Gray);
}
}
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
if (e.PropertyName == "BackgroundColor")
{
Control.SetBackgroundColor(Android.Graphics.Color.Gray);
}
}
}
}
Xaml
<AbsoluteLayout>
<StackLayout AbsoluteLayout.LayoutBounds="0,0,1,0.25" AbsoluteLayout.LayoutFlags="All">
<Label x:Name="live" FontSize="20" />
<Label x:Name="rez" FontSize="15" />
</StackLayout>
<Grid
AbsoluteLayout.LayoutBounds="0,1,1,0.75"
AbsoluteLayout.LayoutFlags="All"
ColumnSpacing="0"
RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<local:MyButton
Grid.Row="0"
Grid.Column="0"
Text="mc" />
<local:MyButton
Grid.Row="0"
Grid.Column="1"
Text="m+" />
<local:MyButton
Grid.Row="0"
Grid.Column="2"
Text="m-" />
<local:MyButton
Grid.Row="0"
Grid.Column="3"
Text="mr" />
<local:MyButton
Grid.Row="1"
Grid.Column="0"
Text="C" />
<local:MyButton
Grid.Row="1"
Grid.Column="1"
Text="/" />
<local:MyButton
Grid.Row="1"
Grid.Column="2"
Text="X" />
<local:MyButton
Grid.Row="1"
Grid.Column="3"
Text="Del" />
<local:MyButton
Grid.Row="2"
Grid.Column="0"
Text="7" />
<local:MyButton
Grid.Row="2"
Grid.Column="1"
Text="8" />
<local:MyButton
Grid.Row="2"
Grid.Column="2"
Text="9" />
<local:MyButton
Grid.Row="2"
Grid.Column="3"
Text="-" />
<local:MyButton
Grid.Row="3"
Grid.Column="0"
Text="4" />
<local:MyButton
Grid.Row="3"
Grid.Column="1"
Text="5" />
<local:MyButton
Grid.Row="3"
Grid.Column="2"
Text="6" />
<local:MyButton
Grid.Row="3"
Grid.Column="3"
Text="+" />
<local:MyButton
Grid.Row="4"
Grid.Column="0"
Text="1" />
<local:MyButton
Grid.Row="4"
Grid.Column="1"
Text="2" />
<local:MyButton
Grid.Row="4"
Grid.Column="2"
Text="3" />
<local:MyButton
Grid.Row="4"
Grid.RowSpan="2"
Grid.Column="3"
Text="=" />
<local:MyButton
Grid.Row="5"
Grid.Column="0"
Text="%" />
<local:MyButton
Grid.Row="5"
Grid.Column="1"
Text="0" />
<local:MyButton
Grid.Row="5"
Grid.Column="2"
Text="," />
</Grid>
</AbsoluteLayout>

Related

Spawn Images on certain position Xamarin Forms

Hello Xamarin community!
I just started with Xamarin Forms and wanted to create a simple app, which helps counting on a card game.
The points should be visualized in this image and should look like the following one:
In the first row there should be a horizontal line every fifth line and on the second line there should be a horizontal line every second line.
Here is how it looks like when i manually add the lines and add a backgroundcolor for visualization:
Here is the View:
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
<RowDefinition Height="*" />
<RowDefinition Height="8*" />
<RowDefinition Height="8*" />
<RowDefinition Height="8*" />
<RowDefinition Height="*" />
<RowDefinition Height="4*" />
<RowDefinition Height="4*" />
</Grid.RowDefinitions>
<Entry Text="{Binding Team1.Name}" Grid.Column="0" Grid.Row="0" />
<Label Text="150" Grid.Column="0" Grid.Row="1" />
<Entry Text="{Binding Team2.Name}" Grid.Column="1" Grid.Row="0" />
<Label Text="129" Grid.Column="1" Grid.Row="1" />
<Image Source="Schlange.png"
Aspect="Fill"
BackgroundColor="#"
Grid.ColumnSpan="2"
Grid.Row="2"
Grid.RowSpan="3" />
<Image Scale="0.5" BackgroundColor="Gray" Source="Strich1.png" Grid.Column="0" Grid.Row="2" Margin="0,0,0,0"/>
<Image BackgroundColor="Blue" Source="Strich1.png"/>
<Button BackgroundColor="Transparent" Grid.Column="0" Grid.Row="2" />
<Button BackgroundColor="Transparent" Grid.Column="0" Grid.Row="3" />
<Button BackgroundColor="Transparent" Grid.Column="0" Grid.Row="4" />
<Button BackgroundColor="Transparent" Grid.Column="1" Grid.Row="2" />
<Button BackgroundColor="Transparent" Grid.Column="1" Grid.Row="3" />
<Button BackgroundColor="Transparent" Grid.Column="1" Grid.Row="4" />
<Label Text="1" Grid.Column="0" Grid.Row="5"></Label>
<Label Text="-1" Grid.Column="1" Grid.Row="5"></Label>
<Entry Grid.Column="0" Grid.Row="6"></Entry>
<Entry Grid.Column="1" Grid.Row="6"></Entry>
<Button Text="Runde!" Grid.Row="7" Grid.ColumnSpan="2" />
</Grid>
My Question would be how to spawn Images on certain positions? Is this even possible with a grid? What happens to mobile phones with different resolution?
Thanks in advance and don't hesitate to ask if needed.

Dial Pad On Xamarin Forms

I want to add a phone dialer key inside content page Layout not launch the Phone Dial outside application.
I used Xamarin essential but its launch Device Phone Dialer out side application page
You may have to design it by yourself. Below are just rough codes for the UI design and blank logic just to give you an idea of how it can be done.
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Entry x:Name="phoneNumber" Grid.Row="0" Grid.ColumnSpan="3" />
<Button Grid.Row="1" Grid.Column="0" Text="1" Clicked="Button_Clicked" />
<Button Grid.Row="1" Grid.Column="1" Text="2" Clicked="Button_Clicked" />
<Button Grid.Row="1" Grid.Column="2" Text="3" Clicked="Button_Clicked" />
<Button Grid.Row="2" Grid.Column="0" Text="4" Clicked="Button_Clicked" />
<Button Grid.Row="2" Grid.Column="1" Text="5" Clicked="Button_Clicked" />
<Button Grid.Row="2" Grid.Column="2" Text="6" Clicked="Button_Clicked" />
<Button Grid.Row="3" Grid.Column="0" Text="7" Clicked="Button_Clicked" />
<Button Grid.Row="3" Grid.Column="1" Text="8" Clicked="Button_Clicked" />
<Button Grid.Row="3" Grid.Column="2" Text="9" Clicked="Button_Clicked" />
<Button Grid.Row="4" Grid.Column="1" Text="0" Clicked="Button_Clicked" />
<Button Grid.Row="5" Grid.ColumnSpan="3" Text="Call" Clicked="Button_Clicked_1" />
</Grid>
The UI would look like below.
Your code-behind should be something like below.
private void Button_Clicked(object sender, EventArgs e)
{
var enteredNumber = (sender as Button).Text;
this.phoneNumber.Text += enteredNumber;
}
private void Button_Clicked_1(object sender, EventArgs e)
{
//Logic to make a call
}
Refer to the below link on how to make a call programmatically.
https://stackoverflow.com/a/37551969/2536167
I hope that helps.

How to solve grid and box error in xamarin

I have a GridLayout in my Xamarin.Forms App. But my App I used BoxView. So in here I want to reduse size in that boxview. in my app when I clicked exixting user its working nicely but when I click new radio button getting crashing. in my app, but in my code its not like that. And I would like each element in the grid as shown here:
Click me and help me
Existing and help me
<ContentPage.Content>
<ScrollView>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Padding="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="20" />
<RowDefinition Height="40" />
<RowDefinition x:Name="addressBoxViewRow" />
</Grid.RowDefinitions>
<Label Text="Care of User - Address" Grid.Row="0" FontAttributes="Bold" FontSize="Default" TextColor="Black" />
<Label Text="Enter the details of the person that the connection will be in care of." TextColor="#757575" Grid.Row="1" FontSize="Small" />
<FlexLayout Grid.Row="2" AlignItems="Center" JustifyContent="Start" Direction="Row">
<Label Text="Address status" FontSize="Small" FontAttributes="Bold" VerticalTextAlignment="Center" TextColor="Black" />
<input:RadioButtonGroupView Margin="20,0,0,0" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" x:Name="addressStatus" VerticalOptions="CenterAndExpand">
<input:RadioButton Text="New" TextFontSize="14" x:Name="newRadioButton" Clicked="NewRadioButton_Clicked" />
<input:RadioButton Text="Existing" IsChecked="true" TextFontSize="14" x:Name="existingRadioButton" Clicked="ExistingRadioButton_Clicked" />
</input:RadioButtonGroupView>
</FlexLayout>
<BoxView Grid.Row="3" BackgroundColor="White" CornerRadius="5">
<BoxView.Effects>
<effects:ShadowEffect />
</BoxView.Effects>
</BoxView>
<!--This appears when Existing selected-->
<Grid Grid.Row="3" Padding="20" x:Name="existingAddressForm">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="Billing address" FontAttributes="Bold" FontSize="Default" TextColor="Black" />
<Label Text="Address line 1" Grid.Row="1" TextColor="#757575" FontSize="Small" />
<Label Grid.Row="2" x:Name="lblAddressLine1" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Address line 2" Grid.Row="3" TextColor="#757575" FontSize="Small" />
<Label Grid.Row="4" x:Name="lblAddressLine2" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Address line 3" Grid.Row="5" TextColor="#757575" FontSize="Small" />
<Label Grid.Row="6" x:Name="lblAddressLine3" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Postal code" Grid.Row="7" TextColor="#757575" FontSize="Small" />
<Label Grid.Row="8" x:Name="lblPostalCode" FontAttributes="Bold" FontSize="Medium" />
</Grid>
<!--This appears when New selected-->
<Grid Grid.Row="3" Padding="20" x:Name="newAddressForm">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="Billing address" FontAttributes="Bold" FontSize="Default" TextColor="Black" />
<Label Text="Address line 1" Grid.Row="1" TextColor="#757575" FontSize="Small" />
<Entry Grid.Row="2" x:Name="addressLine1" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Address line 2" Grid.Row="3" TextColor="#757575" FontSize="Small" />
<Entry Grid.Row="4" x:Name="addressLine2" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Address line 3" Grid.Row="5" TextColor="#757575" FontSize="Small" />
<Entry Grid.Row="6" x:Name="addressLine3" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Postal code" Grid.Row="7" TextColor="#757575" FontSize="Small" />
<Picker Grid.Row="8" TextColor="Black" FontSize="Small" x:Name="postalCodeSelector1" ItemDisplayBinding="{Binding PostalDescription}" WidthRequest="100">
<Picker.Effects>
<effects:DropdownEffect />
</Picker.Effects>
</Picker>
</Grid>
</Grid>
<StackLayout Grid.Row="1" Orientation="Horizontal" VerticalOptions="End">
<Button Text="Clear" Style="{x:StaticResource GrayButton}" HorizontalOptions="FillAndExpand" Clicked="ClearBtn_Clicked"/>
<Button Text="Proceed" HorizontalOptions="FillAndExpand" Clicked="Handle_Clicked" x:Name="proceedBtn" />
</StackLayout>
<!--<StackLayout Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" IsVisible="{Binding IsBusy}" BackgroundColor="White" Opacity="1" Orientation="Vertical">
<StackLayout Orientation="Vertical" HorizontalOptions="Center" VerticalOptions="CenterAndExpand">
<ActivityIndicator Color="#2B428E" IsRunning="true" />
<Label x:Name="progressname" Text="Please wait ..." TextColor="#2B428E" VerticalOptions="Center" />
</StackLayout>
</StackLayout>-->
</Grid>
</ScrollView>
</ContentPage.Content>
Try this
<ScrollView>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Padding="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="20" />
<RowDefinition Height="40" />
<RowDefinition x:Name="addressBoxViewRow" />
</Grid.RowDefinitions>
<Label Text="Care of User - Address" Grid.Row="0" FontAttributes="Bold" FontSize="Default" TextColor="Black" />
<Label Text="Enter the details of the person that the connection will be in care of." TextColor="#757575" Grid.Row="1" FontSize="Small" />
<FlexLayout Grid.Row="2" AlignItems="Center" JustifyContent="Start" Direction="Row">
<Label Text="Address status" FontSize="Small" FontAttributes="Bold" VerticalTextAlignment="Center" TextColor="Black" />
<input:RadioButtonGroupView Margin="20,0,0,0" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" x:Name="addressStatus" VerticalOptions="CenterAndExpand">
<input:RadioButton Text="New" TextFontSize="14" x:Name="newRadioButton" Clicked="NewRadioButton_Clicked" />
<input:RadioButton Text="Existing" IsChecked="true" TextFontSize="14" x:Name="existingRadioButton" Clicked="ExistingRadioButton_Clicked" />
</input:RadioButtonGroupView>
</FlexLayout>
<BoxView Grid.Row="3" BackgroundColor="White" CornerRadius="5">
<BoxView.Effects>
<effects:ShadowEffect />
</BoxView.Effects>
</BoxView>
<!--This appears when Existing selected-->
<Grid Grid.Row="3" Padding="20" x:Name="existingAddressForm">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="Billing address" FontAttributes="Bold" FontSize="Default" TextColor="Black" />
<Label Text="Address line 1" Grid.Row="1" TextColor="#757575" FontSize="Small" />
<Label Grid.Row="2" x:Name="lblAddressLine1" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Address line 2" Grid.Row="3" TextColor="#757575" FontSize="Small" />
<Label Grid.Row="4" x:Name="lblAddressLine2" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Address line 3" Grid.Row="5" TextColor="#757575" FontSize="Small" />
<Label Grid.Row="6" x:Name="lblAddressLine3" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Postal code" Grid.Row="7" TextColor="#757575" FontSize="Small" />
<Label Grid.Row="8" x:Name="lblPostalCode" FontAttributes="Bold" FontSize="Medium" />
</Grid>
<!--This appears when New selected-->
<Grid Grid.Row="3" Padding="20" x:Name="newAddressForm">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
<RowDefinition Height="25" />
<RowDefinition Height="20" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="Billing address" FontAttributes="Bold" FontSize="Default" TextColor="Black" />
<Label Text="Address line 1" Grid.Row="1" TextColor="#757575" FontSize="Small" />
<Entry Grid.Row="2" x:Name="addressLine1" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Address line 2" Grid.Row="3" TextColor="#757575" FontSize="Small" />
<Entry Grid.Row="4" x:Name="addressLine2" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Address line 3" Grid.Row="5" TextColor="#757575" FontSize="Small" />
<Entry Grid.Row="6" x:Name="addressLine3" FontAttributes="Bold" FontSize="Medium" />
<Label Text="Postal code" Grid.Row="7" TextColor="#757575" FontSize="Small" />
<Picker Grid.Row="8" TextColor="Black" FontSize="Small" x:Name="postalCodeSelector1" ItemDisplayBinding="{Binding PostalDescription}" WidthRequest="100">
<Picker.Effects>
<effects:DropdownEffect />
</Picker.Effects>
</Picker>
</Grid>
</Grid>
<StackLayout Grid.Row="1" Orientation="Horizontal" VerticalOptions="End">
<Button Text="Clear" Style="{x:StaticResource GrayButton}" HorizontalOptions="FillAndExpand" Clicked="ClearBtn_Clicked"/>
<Button Text="Proceed" HorizontalOptions="FillAndExpand" Clicked="Handle_Clicked" x:Name="proceedBtn" />
</StackLayout>
<!--<StackLayout Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" IsVisible="{Binding IsBusy}" BackgroundColor="White" Opacity="1" Orientation="Vertical">
<StackLayout Orientation="Vertical" HorizontalOptions="Center" VerticalOptions="CenterAndExpand">
<ActivityIndicator Color="#2B428E" IsRunning="true" />
<Label x:Name="progressname" Text="Please wait ..." TextColor="#2B428E" VerticalOptions="Center" />
</StackLayout>
</StackLayout>-->
</Grid>
</ScrollView>

Vertiical Scrollview not working in xamarin forms.?

I'm trying to scroll the xfxCardview in Xamarin Forms. But it is not scrolling. This is my code
<ScrollView Orientation = "Vertical" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand">
<xfx:XfxCardView
BackgroundColor="White"
CornerRadius="30"
Elevation="20"
HeightRequest="160" IsClippedToBounds="True" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Horizontal">
<Grid VerticalOptions="CenterAndExpand"
Padding="0"
HorizontalOptions="FillAndExpand"
BackgroundColor="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Margin="10,5,5,-20" CornerRadius="10" Grid.RowSpan="3" BackgroundColor="LightBlue" IsClippedToBounds="True">
<Image Margin="-70,-70,-70,-70" Grid.Row="0" Grid.Column="0" Grid.RowSpan="4" Source="restaurantimage1.jpg" />
</Frame>
<Label Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="0,10,0,0" TextColor="Black" FontFamily="Bold,100" Text="Premera restaurant" />
<Image Grid.Row="0" Grid.Column="5" Margin="0,10,0,0" Source="whitehearticon3"/>
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="6" Text="Avenue Road, 256" TextColor="Blue" />
<Label Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="6" Text="Indian,Italy,Chinese Kitchen" />
<Image Grid.Row="3" Grid.Column="1" Source="whitestaricon1"/>
<Label Grid.Row="3" Grid.Column="2" HeightRequest="30" Text="4,3" />
<Image Grid.Row="3" Grid.Column="3" Margin="-10,0,0,0" Source="rupeeicon1"/>
<Label Grid.Row="3" Grid.Column="4" Margin="-10,0,0,0" Text="150 min" />
<Image Grid.Row="3" Grid.Column="5" Margin="-20,0,0,0" Source="handicon1"/>
<Label Grid.Row="3" Grid.Column="6" Margin="-10,0,0,0" HeightRequest="10" Text="Free 3kms" />
</Grid>
</StackLayout>
</xfx:XfxCardView>
<xfx:XfxCardView
BackgroundColor="White"
CornerRadius="30"
Elevation="20"
HeightRequest="160" IsClippedToBounds="True" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Horizontal">
<Grid VerticalOptions="CenterAndExpand"
Padding="0"
HorizontalOptions="FillAndExpand"
BackgroundColor="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="35" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Margin="10,5,5,-20" CornerRadius="10" Grid.RowSpan="3" BackgroundColor="LightBlue" IsClippedToBounds="True">
<Image Margin="-70,-70,-70,-70" Grid.Row="0" Grid.Column="0" Grid.RowSpan="4" Source="restaurantimage2.jpg" />
</Frame>
<Label Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="0,10,0,0" TextColor="Black" FontFamily="Bold,100" Text="Pesto restaurant" />
<Image Grid.Row="0" Grid.Column="5" Margin="0,10,0,0" Source="whitehearticon3"/>
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="6" Text="Bodhami Road, 6" TextColor="Blue" />
<Label Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="6" Text="Indian,Italy,Chinese Kitchen" />
<Image Grid.Row="3" Grid.Column="1" Source="whitestaricon1"/>
<Label Grid.Row="3" Grid.Column="2" HeightRequest="30" Text="3,0" />
<Label Grid.Row="3" Grid.Column="4" Grid.ColumnSpan="3" Text="No available" TextColor="Blue" />
</Grid>
</StackLayout>
</xfx:XfxCardView>
<Label Text="RESTAURANTS AWAY FROM YOU" TextColor="#595959" HeightRequest="30"></Label>
<Label Text="25 Restaurants finded" TextColor="#d9d9d9" HeightRequest="20"></Label>
<xfx:XfxCardView
BackgroundColor="White"
CornerRadius="30"
Elevation="20"
HeightRequest="160" IsClippedToBounds="True" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Horizontal">
<Grid VerticalOptions="CenterAndExpand"
Padding="0"
HorizontalOptions="FillAndExpand"
BackgroundColor="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Margin="10,5,5,-20" CornerRadius="10" Grid.RowSpan="3" BackgroundColor="LightBlue" IsClippedToBounds="True">
<Image Margin="-70,-70,-70,-70" Grid.Row="0" Grid.Column="0" Grid.RowSpan="4" Source="restaurantimage3.jpg" />
</Frame>
<Label Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="0,10,0,0" TextColor="Black" FontFamily="Bold,100" Text="Hero" />
<Image Grid.Row="0" Grid.Column="5" Margin="0,10,0,0" Source="whitehearticon3"/>
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="6" Text="Line street,2" TextColor="Blue" />
<Label Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="6" Text="Indian,Italy,Chinese Kitchen" />
<Image Grid.Row="3" Grid.Column="1" Source="whitestaricon1"/>
<Label Grid.Row="3" Grid.Column="2" HeightRequest="30" Text="4,3" />
<Image Grid.Row="3" Grid.Column="3" Margin="-10,0,0,0" Source="rupeeicon1"/>
<Label Grid.Row="3" Grid.Column="4" Margin="-10,0,0,0" Text="150 min" />
<Image Grid.Row="3" Grid.Column="5" Margin="-20,0,0,0" Source="handicon1"/>
<Label Grid.Row="3" Grid.Column="6" Margin="-10,0,0,0" HeightRequest="10" Text="Free 3kms" />
</Grid>
</StackLayout>
</xfx:XfxCardView>
</StackLayout>
</ScrollView>
I don't know what is wrong with my code I'm setting orientation as vertical also I'm setting VerticalOptions as fill and expand. Will the scroll view work or should I put the XfxCardview inside a Listview. This is the how my current UI looks like
and the UI doesn't scroll to the bottom.
In Android, the issue is due to the card height. Three cardviews are aligned perfectly with the screen. That's the reason, you are not seeing scrollview in Android. Scrollview functionality will be available only if the the content inside scrollview is greater than scrollview height. To solve this, try the below solution. Add add more cardviews, you will see the scrollview. Another solution is, I've added height as 300 to the scrollview. You can test and modify based on your requirement.
<ScrollView HeightRequest="300" Orientation = "Vertical" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand">
<xfx:XfxCardView
BackgroundColor="White"
CornerRadius="30"
Elevation="20"
HeightRequest="260" IsClippedToBounds="True" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Horizontal">
<Grid VerticalOptions="CenterAndExpand"
Padding="0"
HorizontalOptions="FillAndExpand"
BackgroundColor="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Margin="10,5,5,-20" CornerRadius="10" Grid.RowSpan="3" BackgroundColor="LightBlue" IsClippedToBounds="True">
<Image Margin="-70,-70,-70,-70" Grid.Row="0" Grid.Column="0" Grid.RowSpan="4" Source="restaurantimage1.jpg" />
</Frame>
<Label Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="0,10,0,0" TextColor="Black" FontFamily="Bold,100" Text="Premera restaurant" />
<Image Grid.Row="0" Grid.Column="5" Margin="0,10,0,0" Source="whitehearticon3"/>
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="6" Text="Avenue Road, 256" TextColor="Blue" />
<Label Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="6" Text="Indian,Italy,Chinese Kitchen" />
<Image Grid.Row="3" Grid.Column="1" Source="whitestaricon1"/>
<Label Grid.Row="3" Grid.Column="2" HeightRequest="30" Text="4,3" />
<Image Grid.Row="3" Grid.Column="3" Margin="-10,0,0,0" Source="rupeeicon1"/>
<Label Grid.Row="3" Grid.Column="4" Margin="-10,0,0,0" Text="150 min" />
<Image Grid.Row="3" Grid.Column="5" Margin="-20,0,0,0" Source="handicon1"/>
<Label Grid.Row="3" Grid.Column="6" Margin="-10,0,0,0" HeightRequest="10" Text="Free 3kms" />
</Grid>
</StackLayout>
</xfx:XfxCardView>
<xfx:XfxCardView
BackgroundColor="White"
CornerRadius="30"
Elevation="20"
HeightRequest="260" IsClippedToBounds="True" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Horizontal">
<Grid VerticalOptions="CenterAndExpand"
Padding="0"
HorizontalOptions="FillAndExpand"
BackgroundColor="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Margin="10,5,5,-20" CornerRadius="10" Grid.RowSpan="3" BackgroundColor="LightBlue" IsClippedToBounds="True">
<Image Margin="-70,-70,-70,-70" Grid.Row="0" Grid.Column="0" Grid.RowSpan="4" Source="restaurantimage2.jpg" />
</Frame>
<Label Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="0,10,0,0" TextColor="Black" FontFamily="Bold,100" Text="Pesto restaurant" />
<Image Grid.Row="0" Grid.Column="5" Margin="0,10,0,0" Source="whitehearticon3"/>
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="6" Text="Bodhami Road, 6" TextColor="Blue" />
<Label Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="6" Text="Indian,Italy,Chinese Kitchen" />
<Image Grid.Row="3" Grid.Column="1" Source="whitestaricon1"/>
<Label Grid.Row="3" Grid.Column="2" HeightRequest="30" Text="3,0" />
<Label Grid.Row="3" Grid.Column="4" Grid.ColumnSpan="3" Text="No available" TextColor="Blue" />
</Grid>
</StackLayout>
</xfx:XfxCardView>
<Label Text="RESTAURANTS AWAY FROM YOU" TextColor="#595959" HeightRequest="30"></Label>
<Label Text="25 Restaurants finded" TextColor="#d9d9d9" HeightRequest="20"></Label>
<xfx:XfxCardView
BackgroundColor="White"
CornerRadius="30"
Elevation="20"
HeightRequest="260" IsClippedToBounds="True" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Horizontal">
<Grid VerticalOptions="CenterAndExpand"
Padding="0"
HorizontalOptions="FillAndExpand"
BackgroundColor="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Margin="10,5,5,-20" CornerRadius="10" Grid.RowSpan="3" BackgroundColor="LightBlue" IsClippedToBounds="True">
<Image Margin="-70,-70,-70,-70" Grid.Row="0" Grid.Column="0" Grid.RowSpan="4" Source="restaurantimage3.jpg" />
</Frame>
<Label Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="0,10,0,0" TextColor="Black" FontFamily="Bold,100" Text="Hero" />
<Image Grid.Row="0" Grid.Column="5" Margin="0,10,0,0" Source="whitehearticon3"/>
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="6" Text="Line street,2" TextColor="Blue" />
<Label Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="6" Text="Indian,Italy,Chinese Kitchen" />
<Image Grid.Row="3" Grid.Column="1" Source="whitestaricon1"/>
<Label Grid.Row="3" Grid.Column="2" HeightRequest="30" Text="4,3" />
<Image Grid.Row="3" Grid.Column="3" Margin="-10,0,0,0" Source="rupeeicon1"/>
<Label Grid.Row="3" Grid.Column="4" Margin="-10,0,0,0" Text="150 min" />
<Image Grid.Row="3" Grid.Column="5" Margin="-20,0,0,0" Source="handicon1"/>
<Label Grid.Row="3" Grid.Column="6" Margin="-10,0,0,0" HeightRequest="10" Text="Free 3kms" />
</Grid>
</StackLayout>
</xfx:XfxCardView>
</StackLayout>
</ScrollView>
Your xaml looks ok, try check few things:
that you don't have a forgotten custom renderer for scrollview with disabled scroll included in android project
check that it scrolls without elevations set, might be a bug
another "bug" i can imagine: looks at the last card: it is possible that it just didn't take its 160 height but just filled the parent with VerticalOptions="FillAndExpand" so there's nothing to scroll. And card's content was clipped with IsClippedToBounds="True" so it didn't Expand the card.

Grid rows overlap on Android but not on iOS

I am using a Grid Layout to make a registration form. I have a Grid which contains two rows. The first row is an image, the second row is another Grid and has the problem that on Android the entries (which are in a StackLayout) overlap the button, but this doesn't make sense because the grid should never overlap its other rows. Indeed, it works on iOS.
XAML:
<Grid>
<Grid.RowDefinitions>
<RowDefinition
Height="Auto" />
<RowDefinition
Height="*" />
</Grid.RowDefinitions>
<Image
Source="blue_background.png"
Aspect="Fill"
Grid.Row="0"
Grid.Column="0" />
<Image
Source="icon.png"
Grid.Row="0"
Grid.Column="0"
VerticalOptions="Center" />
<Grid
Padding="10"
Grid.Row="1"
Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition
Height="*" />
<RowDefinition
Height="2*" />
<RowDefinition
Height="*" />
<RowDefinition
Height="Auto" />
</Grid.RowDefinitions>
<Label
Text="Unisciti a Youni!"
FontSize="Large"
FontAttributes="Bold"
HorizontalTextAlignment="Center"
TextColor="#174668"
Grid.Row="0"
Grid.Column="0"
VerticalOptions="Center" />
<StackLayout
Grid.Row="1"
Grid.Column="0"
Spacing="0"
VerticalOptions="Fill">
<Entry
Text="{Binding RegName}"
Placeholder="Nome"
VerticalOptions="FillAndExpand" />
<Entry
Text="{Binding RegSurname}"
Placeholder="Cognome"
VerticalOptions="FillAndExpand" />
<Entry
Text="{Binding RegEmail}"
Placeholder="Email"
Keyboard="Email"
VerticalOptions="FillAndExpand" />
<Entry
Text="{Binding RegPassword}"
Placeholder="Password"
IsPassword="true"
VerticalOptions="FillAndExpand" />
<Entry
Text="{Binding RegPasswordConfirm}"
Placeholder="Conferma password"
IsPassword="true"
VerticalOptions="FillAndExpand" />
</StackLayout>
<Button
Command="{Binding RegisterCommand}"
Text=" Registrati "
TextColor="White"
BackgroundColor="#3A8FDA"
Grid.Row="2"
Grid.Column="0"
HorizontalOptions="Center"
VerticalOptions="Center" />
<StackLayout
Orientation="Horizontal"
HorizontalOptions="Center"
VerticalOptions="Center"
Grid.Row="3"
Grid.Column="0">
<StackLayout.Spacing>
<OnPlatform
x:TypeArguments="x:Double">
<On
Platform="Android"
Value="-10" />
<On
Platform="iOS"
Value="3" />
</OnPlatform>
</StackLayout.Spacing>
<Label
Text="Sei già registrato?"
FontSize="Small"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center" />
<Button
x:Name="LoginSwitchButton"
Pressed="LoginSwitch_Handle_Pressed"
Released="LoginSwitch_Handle_Released"
Command="{Binding LoginSwitchCommand}"
Text="Passa al login"
FontSize="Small"
TextColor="#45BFEE"
BackgroundColor="Transparent" />
</StackLayout>
</Grid>
</Grid>
My suggestion to fix your issue would be to start by simplifying your layout because you have extra nested views inside of grids when one single Grid could probably be used for the entire thing. For example:
<Grid ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Grid.ColumnSpan="2" Source="blue_background.png" Aspect="Fill" />
<Image Grid.ColumnSpan="2" Source="icon.png" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Row="1" Grid.ColumnSpan="2" Text="Unisciti a Youni!" FontSize="Large" FontAttributes="Bold" TextColor="#174668" VerticalOptions="Center" HorizontalOptions="Center"/>
<Entry Grid.Row="2" Grid.ColumnSpan="2" Margin="10,0" Text="{Binding RegName}" Placeholder="Nome" VerticalOptions="FillAndExpand" />
<Entry Grid.Row="3" Grid.ColumnSpan="2" Margin="10,0" Text="{Binding RegSurname}" Placeholder="Cognome" VerticalOptions="FillAndExpand" />
<Entry Grid.Row="4" Grid.ColumnSpan="2" Margin="10,0" Text="{Binding RegEmail}" Placeholder="Email" Keyboard="Email" VerticalOptions="FillAndExpand" />
<Entry Grid.Row="5" Grid.ColumnSpan="2" Margin="10,0" Text="{Binding RegPassword}" Placeholder="Password" IsPassword="true" VerticalOptions="FillAndExpand" />
<Entry Grid.Row="6" Grid.ColumnSpan="2" Margin="10,0" Text="{Binding RegPasswordConfirm}" Placeholder="Conferma password" IsPassword="true" VerticalOptions="FillAndExpand" />
<Button Grid.Row="7" Grid.ColumnSpan="2" Command="{Binding RegisterCommand}" Text=" Registrati " TextColor="White" BackgroundColor="#3A8FDA" HorizontalOptions="Center" VerticalOptions="Center" />
<Label Grid.Row="8" Text="Sei già registrato?" FontSize="Small" VerticalOptions="Center" HorizontalOptions="End" />
<Button Grid.Row="8" Grid.Column="1" x:Name="LoginSwitchButton" Command="{Binding LoginSwitchCommand}" Text="Passa al login" VerticalOptions="Center" HorizontalOptions="Start" FontSize="Small" TextColor="#45BFEE" BackgroundColor="Transparent" />
</Grid>
Then from there I'd adjust the row heights and spacing to match your designs accordingly.
Just change your root container layout to ScrollView
<ScrollView>
<Grid>
<Grid.RowDefinitions>
<RowDefinition
Height="Auto" />
<RowDefinition
Height="*" />
</Grid.RowDefinitions>
<Image
Source="blue_background.png"
Aspect="Fill"
Grid.Row="0"
Grid.Column="0" />
<Image
Source="icon.png"
Grid.Row="0"
Grid.Column="0"
VerticalOptions="Center" />
<Grid
Padding="10"
Grid.Row="1"
Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition
Height="*" />
<RowDefinition
Height="2*" />
<RowDefinition
Height="*" />
<RowDefinition
Height="Auto" />
</Grid.RowDefinitions>
<Label
Text="Unisciti a Youni!"
FontSize="Large"
FontAttributes="Bold"
HorizontalTextAlignment="Center"
TextColor="#174668"
Grid.Row="0"
Grid.Column="0"
VerticalOptions="Center" />
<StackLayout
Grid.Row="1"
Grid.Column="0"
Spacing="0"
VerticalOptions="Fill">
<Entry
Text="{Binding RegName}"
Placeholder="Nome"
VerticalOptions="FillAndExpand" />
<Entry
Text="{Binding RegSurname}"
Placeholder="Cognome"
VerticalOptions="FillAndExpand" />
<Entry
Text="{Binding RegEmail}"
Placeholder="Email"
Keyboard="Email"
VerticalOptions="FillAndExpand" />
<Entry
Text="{Binding RegPassword}"
Placeholder="Password"
IsPassword="true"
VerticalOptions="FillAndExpand" />
<Entry
Text="{Binding RegPasswordConfirm}"
Placeholder="Conferma password"
IsPassword="true"
VerticalOptions="FillAndExpand" />
</StackLayout>
<Button
Command="{Binding RegisterCommand}"
Text=" Registrati "
TextColor="White"
BackgroundColor="#3A8FDA"
Grid.Row="2"
Grid.Column="0"
HorizontalOptions="Center"
VerticalOptions="Center" />
<StackLayout
Orientation="Horizontal"
HorizontalOptions="Center"
VerticalOptions="Center"
Grid.Row="3"
Grid.Column="0">
<StackLayout.Spacing>
<OnPlatform
x:TypeArguments="x:Double">
<On
Platform="Android"
Value="-10" />
<On
Platform="iOS"
Value="3" />
</OnPlatform>
</StackLayout.Spacing>
<Label
Text="Sei già registrato?"
FontSize="Small"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center" />
<Button
x:Name="LoginSwitchButton"
Pressed="LoginSwitch_Handle_Pressed"
Released="LoginSwitch_Handle_Released"
Command="{Binding LoginSwitchCommand}"
Text="Passa al login"
FontSize="Small"
TextColor="#45BFEE"
BackgroundColor="Transparent" />
</StackLayout>
</Grid>
</Grid>
</ScrollView>
Put your Grid in ScrollView

Resources