Scrollview is not working in Xamarin Forms - xamarin.forms

I have following layout in my xamarin forms application:
<?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:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
x:Class="DMGMobile.UserDetailPage">
<ContentPage.ToolbarItems>
<ToolbarItem Name="Save" Icon="settings.png" Clicked="Save"></ToolbarItem>
</ContentPage.ToolbarItems>
<ContentPage.Content>
<ScrollView
Orientation="Vertical"
VerticalScrollBarVisibility="Always"
VerticalOptions="FillAndExpand">
<StackLayout
VerticalOptions="FillAndExpand"
Padding="10,0,10,0">
<Label
Text="Name"/>
<telerikInput:RadEntry
x:Name="User_Name"
BackgroundColor="White"
WatermarkText="Name"
TextColor="Black"
WatermarkTextColor="#C0C0C0">
<telerikInput:RadEntry.Padding>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="Android,UWP" Value="10,10,0,10" />
<On Platform="iOS" Value="10,10,0,20" />
</OnPlatform>
</telerikInput:RadEntry.Padding>
<telerikInput:RadEntry.BorderStyle>
<telerikInput:BorderStyle
CornerRadius="8"
BorderColor="#257cc1"
BorderThickness="1" />
</telerikInput:RadEntry.BorderStyle>
</telerikInput:RadEntry>
<Label
Text="Surname"/>
<telerikInput:RadEntry
x:Name="User_Vorname"
BackgroundColor="White"
WatermarkText="Surname"
TextColor="Black"
WatermarkTextColor="#C0C0C0">
<telerikInput:RadEntry.Padding>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="Android,UWP" Value="10,10,0,10" />
<On Platform="iOS" Value="10,10,0,20" />
</OnPlatform>
</telerikInput:RadEntry.Padding>
<telerikInput:RadEntry.BorderStyle>
<telerikInput:BorderStyle
CornerRadius="8"
BorderColor="#257cc1"
BorderThickness="1" />
</telerikInput:RadEntry.BorderStyle>
</telerikInput:RadEntry>
<Label
Text="Login"/>
<telerikInput:RadEntry
x:Name="User_Login"
BackgroundColor="White"
WatermarkText="Login"
TextColor="Black"
WatermarkTextColor="#C0C0C0"
TextChanged="User_Login_TextChanged">
<telerikInput:RadEntry.Padding>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="Android,UWP" Value="10,10,0,10" />
<On Platform="iOS" Value="10,10,0,20" />
</OnPlatform>
</telerikInput:RadEntry.Padding>
<telerikInput:RadEntry.BorderStyle>
<telerikInput:BorderStyle
CornerRadius="8"
BorderColor="#257cc1"
BorderThickness="1" />
</telerikInput:RadEntry.BorderStyle>
</telerikInput:RadEntry>
<Label
Text="Pass"/>
<telerikInput:RadEntry
x:Name="User_Password"
BackgroundColor="Transparent"
WatermarkText="Pass"
TextColor="Black"
WatermarkTextColor="#C0C0C0"
TextChanged="User_Login_TextChanged">
<telerikInput:RadEntry.Padding>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="Android,UWP" Value="10,10,0,10" />
<On Platform="iOS" Value="10,10,0,20" />
</OnPlatform>
</telerikInput:RadEntry.Padding>
<telerikInput:RadEntry.BorderStyle>
<telerikInput:BorderStyle
CornerRadius="8"
BorderColor="#257cc1"
BorderThickness="1" />
</telerikInput:RadEntry.BorderStyle>
</telerikInput:RadEntry>
<telerikPrimitives:RadCheckBox
x:Name="User_IsAdmin" />
<Label
Text="Is admin}"/>
</StackLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage>
The problem is that ScrollView is not working. I can't even see vertical scrollbar although VerticalScrollBarVisibility is set to Always.
The page looks nice without keyboard, but if keyboard shown then some inputs placed on the bottom of the page are hidden and I can't scroll to reach them.
Am I missing something obious here?

If you are using Android, you can add this, after LoadApplication in MainActivity:
Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);

Related

Grid does not fit the screen on Xiaomi

I have a somewhat unusual problem and I did not find any references in the searches I performed.
I have a Xamarin Forms application and on the login screen the Grid does not adjust to the layout and does not display any controls on the screen.
To make it easier to understand, I made the screen as simple as possible by replacing the background image with a solid color one.
I've already changed the login screen several times, but it didn't work. I've tried with the Grid, without the Grid, Grid with lines, Grid without lines, a Stacklayout for each line of the Grid, a single Stacklayout, with Frame, without Frame, but nothing solves.
And the worst thing is that in the tests done by the robot on firebase, they found no errors.
This only happens on some Xiaomi (on other devices, even Xiaomi, it doesn't).
I'm using VS 2019 and Xamarin Forms 4.8.0.1269.
<?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:controls="clr-namespace:MySample.Controls"
BackgroundImage="solid.png"
x:Class="MySample.Views.LoginView">
<ContentPage.Padding>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="iOS" Value="0,20,0,0" />
</OnPlatform>
</ContentPage.Padding>
<ContentPage.Content>
<Grid x:Name="gridExterno"
RowSpacing="0"
ColumnSpacing="0"
Padding="30,20,30,5"
BackgroundColor="White"
Margin="30,5"
VerticalOptions="CenterAndExpand" HorizontalOptions="Center">
<Grid.MinimumHeightRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="600" Phone="300" Desktop="300"/>
</Grid.MinimumHeightRequest>
<Grid.MinimumWidthRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="800" Phone="600" Desktop="600"/>
</Grid.MinimumWidthRequest>
<Grid.WidthRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="800" Phone="600" Desktop="600"/>
</Grid.WidthRequest>
<Grid.RowDefinitions>
<RowDefinition Height="3*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="logo.png" VerticalOptions="Center" HorizontalOptions="Center" Margin="0,10,0,10">
<Image.WidthRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="350" Phone="300" Desktop="300"/>
</Image.WidthRequest>
</Image>
<StackLayout
Orientation="Vertical"
Grid.Row="1"
VerticalOptions="Center"
HorizontalOptions="Center"
Spacing="15"
Margin="10">
<Entry x:Name="EntryLogin"
TextChanged="OnEntryLoginTextChanged"
MaxLength="20"
Text=""
Keyboard="Numeric"
HorizontalOptions="FillAndExpand">
<Entry.WidthRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="400" Phone="300" Desktop="300"/>
</Entry.WidthRequest>
<Entry.HeightRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="75" Phone="50" Desktop="50"/>
</Entry.HeightRequest>
<Entry.Margin>
<OnIdiom x:TypeArguments="Thickness" Tablet="0,0,0,20" Phone="0" Desktop="0"/>
</Entry.Margin>
<Entry.FontSize>
<OnIdiom x:TypeArguments="x:Double" Tablet="30" Phone="20" Desktop="20" />
</Entry.FontSize>
</Entry>
<Entry x:Name="EntryPassword"
Text=""
MaxLength="20"
IsPassword="True"
HorizontalOptions="FillAndExpand">
<Entry.Margin>
<OnIdiom x:TypeArguments="Thickness" Tablet="0,0,0,20" Phone="0" Desktop="0"/>
</Entry.Margin>
<Entry.WidthRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="400" Phone="300" Desktop="300"/>
</Entry.WidthRequest>
<Entry.HeightRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="75" Phone="50" Desktop="50"/>
</Entry.HeightRequest>
<Entry.FontSize>
<OnIdiom x:TypeArguments="x:Double" Tablet="28" Phone="20" Desktop="20"/>
</Entry.FontSize>
</Entry>
<StackLayout Orientation="Horizontal" Spacing="16" HorizontalOptions="FillAndExpand">
<StackLayout.Margin>
<OnIdiom x:TypeArguments="Thickness" Tablet="2,0" Phone="0" Desktop="0"/>
</StackLayout.Margin>
<CheckBox x:Name="ckRemember"/>
<Label Text="Remember Me" VerticalOptions="Center">
<Label.FontSize>
<OnIdiom x:TypeArguments="x:Double" Tablet="26" Phone="18" Desktop="18"/>
</Label.FontSize>
</Label>
</StackLayout>
<Button x:Name="btnEntrar1"
Text="Enter"
BackgroundColor="{StaticResource ButtonPrimary}"
Clicked="OnLoginAsync"
TextColor="White"
HorizontalOptions="FillAndExpand">
<Button.WidthRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="400" Phone="300" Desktop="300"/>
</Button.WidthRequest>
<Button.HeightRequest>
<OnIdiom x:TypeArguments="x:Double" Tablet="75" Phone="50" Desktop="50"/>
</Button.HeightRequest>
<Button.FontSize>
<OnIdiom x:TypeArguments="x:Double" Tablet="18" />
</Button.FontSize>
<Button.Margin>
<OnIdiom x:TypeArguments="Thickness" Tablet="0,15,0,0" Phone="0" Desktop="0"/>
</Button.Margin>
</Button>
<Label x:Name="lblVersion"
VerticalOptions="End"
HorizontalTextAlignment="Center"
HorizontalOptions="Center">
<Label.FontSize>
<OnIdiom x:TypeArguments="x:Double" Tablet="20" Phone="16" Desktop="16"/>
</Label.FontSize>
<Label.Margin>
<OnIdiom x:TypeArguments="Thickness" Tablet="0,0,0,10" Phone="0,3,0,5" Desktop="0,3,0,5"/>
</Label.Margin>
</Label>
</StackLayout>
</Grid>
</ContentPage.Content>
</ContentPage>
Change the x:Name="gridExterno" HorizontalOptions to HorizontalOptions="CenterAndExpand"

Missing Symbols after resuming windows in Xamarin.forms app

I have a Multiplattform app in Xamarin.forms for iOS, Android and UWP.
I'm using materialdesignicons-webfont.ttf for all my symbols.
If the windows goes in standby mode and resume after that, all symbols are missing.
<?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:SymbolTest"
x:Class="SymbolTest.MainPage">
<ContentPage.Resources>
<ResourceDictionary>
<OnPlatform x:Key="MaterialFontFamily" x:TypeArguments="x:String">
<On Platform="UWP" Value="Assets/Fonts/materialdesignicons-webfont.ttf#Material Design Icons" />
</OnPlatform>
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout>
<Label Text="" HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" >
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="UWP" Value="Assets/Fonts/materialdesignicons-webfont.ttf#Material Design Icons" />
</OnPlatform>
</Label.FontFamily>
</Label>
<Button Grid.Column="1" x:Name="btnSearch" BackgroundColor="LightBlue" >
<Button.ImageSource>
<FontImageSource FontFamily="{StaticResource MaterialFontFamily}" Size="36" Glyph="" Color="SlateGray" />
</Button.ImageSource>
</Button>
</StackLayout>
</ContentPage>
The ButtonImage ist missing the Label.Text is not missing
Missing Symbols after resuming windows in Xamarin.forms app
I created code sample follow this tutorial, And it works well if I sleep the computer and resuming, please check the following code if you have missed some key procedure.
<Label Text="">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="UWP" Value="Assets/Fonts/materialdesignicons-webfont.ttf#Material Design Icons" />
</OnPlatform>
</Label.FontFamily>
</Label>
Update
I could reproduce your issue, and it only occurs in reference StaticResource scenario, it looks a bug, please feel free post the bug report in Xamarin github, and I will report it to related team.

xamarin forms master detail page flow direction in arabic

I have a Master-Detail Page in my project, I've set the phone language to Arabic and everything is working fine the master page is on the right and the icon is on the right. But the thing is the TitleView (toolbaritems) are pushed a little bit to the right when the phone is set to Arabic. I tried this without Master-Detail page project and the TitleView is working fine and it is in the exact place.
With Master Detail Page:
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:AppXamarin.Pages"
x:Class="AppXamarin.Pages.MasterMainPage" NavigationPage.HasNavigationBar="False" NavigationPage.HasBackButton="False" FlowDirection="{x:Static Device.FlowDirection}">
<MasterDetailPage.Master>
<local:MasterPage x:Name ="masterPage" FlowDirection="{x:Static Device.FlowDirection}"/>
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<NavigationPage FlowDirection="{x:Static Device.FlowDirection}">
<x:Arguments>
<local:MenuPage></local:MenuPage>
</x:Arguments>
</NavigationPage>
</MasterDetailPage.Detail>
</MasterDetailPage>
MenuPage Xaml file:
<NavigationPage.TitleView>
<Grid Grid.Row="0" Grid.Column="0" HorizontalOptions="EndAndExpand" FlowDirection="{x:Static Device.FlowDirection}">
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="cart_Clicked"/>
</Grid.GestureRecognizers>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Image x:Name="BadgeIconImage" Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="6" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Source="cart">
<Image.HeightRequest>
<OnIdiom Phone="25" Tablet="35"/>
</Image.HeightRequest>
<Image.WidthRequest>
<OnIdiom Phone="25" Tablet="35"/>
</Image.WidthRequest>
</Image>
<Frame x:Name="BadgeFrame" Grid.Row="0" Grid.Column="1" CornerRadius="12" Padding="10,4" HasShadow="false" OutlineColor="Transparent" BackgroundColor="Transparent">
<Label x:Name="BadgeTextLabel" FontSize="12" FontAttributes="Bold" HorizontalOptions="EndAndExpand" TextColor="#FF0000"/>
</Frame>
</Grid>
</NavigationPage.TitleView>
Result:
Without Master Detail Page:
<NavigationPage.TitleView>
<Grid Grid.Row="0" Grid.Column="0" HorizontalOptions="EndAndExpand" FlowDirection="{x:Static Device.FlowDirection}">
<!--<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="cart_Clicked"/>
</Grid.GestureRecognizers>-->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Image x:Name="BadgeIconImage" Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="6" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Source="cart">
<Image.HeightRequest>
<OnIdiom Phone="25" Tablet="35"/>
</Image.HeightRequest>
<Image.WidthRequest>
<OnIdiom Phone="25" Tablet="35"/>
</Image.WidthRequest>
</Image>
<Frame x:Name="BadgeFrame" Grid.Row="0" Grid.Column="1" CornerRadius="12" Padding="10,4" HasShadow="false" OutlineColor="Transparent" BackgroundColor="Transparent">
<Label x:Name="BadgeTextLabel" FontSize="12" FontAttributes="Bold" HorizontalOptions="EndAndExpand" TextColor="#FF0000"/>
</Frame>
</Grid>
<!--</Grid>-->
</NavigationPage.TitleView>
Result:
My understanding tells me you are trying to add toolbar items so you do not use titleView for that:
What you should be doing, on the other hand, is something like below
C#:
this.ToolbarItems.Add(new ToolbarItem()
{
Icon = "BadgeIconImage",
Command = YourCommand,
});
XAML:
<ContentPage.ToolbarItems>
<ToolbarItem Order="Primary" Icon="BadgeIconImage" />
</ContentPage.ToolbarItems>
To understand Xamarin Forms Toolbar check this guide by Adam Pedley
Update
I have a feeling that the padding that you are using on the Frame is what's pushing your View
Padding="10,4"
Check this:
<Frame x:Name="BadgeFrame" Grid.Row="0" Grid.Column="1" CornerRadius="12" Padding="10,4" HasShadow="false" OutlineColor="Transparent" BackgroundColor="Transparent">
Also could be the corner radius.
Yes I did it
manifest :
<application android:label="Sanaap" android:icon="#mipmap/launcher_foreground" android:theme="#style/MainTheme" android:supportsRtl="true">
MainView.xaml
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Sanaap.App.Views.MenuView"
FlowDirection="RightToLeft"
Title="Main">

xamarin forms get a value from ResourceDictionary

I have 2 different values for the Left Margin and the Right Margin for my application. (Let say 27 and 64)
Is it possible to get these values from the ResourcesDictionaty and set them in my XAML.
For example
<StackLayout Margin="{Left1},0,{Right1},0">
</StackLayout>
You can specify them as double values in ResourceDictionary and refer to them in other resources/styles or at element level itself.
Sample resource-dictionary
<ResourceDictionary>
<!-- namespace declaration
xmlns:sys="clr-namespace:System;assembly=System.Runtime" -->
<sys:Double x:Key="leftMargin">20</sys:Double>
<sys:Double x:Key="rightMargin">30</sys:Double>
<Thickness x:Key="MyMargin1"
Left="{StaticResource leftMargin}"
Right="{StaticResource rightMargin}"
Top="20"
Bottom="30" />
<Thickness x:Key="MyMargin2"
Left="{StaticResource leftMargin}"
Right="{StaticResource rightMargin}"
Top="5"
Bottom="15" />
</ResourceDictionary>
Sample usage
<StackLayout>
<BoxView BackgroundColor="Blue" Margin="{StaticResource MyMargin1}" />
<BoxView HeightRequest="1" BackgroundColor="Black" />
<BoxView BackgroundColor="Red" Margin="{StaticResource MyMargin2}" />
<BoxView HeightRequest="1" BackgroundColor="Black" />
<BoxView BackgroundColor="Yellow">
<BoxView.Margin>
<Thickness
Left="{StaticResource leftMargin}"
Right="{StaticResource rightMargin}"
Top="30"
Bottom="10" />
</BoxView.Margin>
</BoxView>
<BoxView HeightRequest="1" BackgroundColor="Black" />
</StackLayout>
I don't think doing this for individual values will work. You can however bind the entire Margin to a value in a resource dictionary as follows:
<ResourceDictionary>
<Thickness x:Key="MyMargin">27,0,64,0</Thickness>
</ResourceDictionary>
<StackLayout Margin="{StaticResource MyMargin}">
</StackLayout>

AbsoluteLayout doesnt align controls as expected when positions are same

I am trying to get the similar popup as below on Androd, see the X close button is nicely lays on top of the frame. I copied code from the github to test but actual code is also not working. half of the button is always behind the frame. I thought that first added control goes below and 2nd one comes above if their position lays on each other. is there any exception here? whatever I tried i couldnt set button obove the frame. Can somebody sheds some light on usage of absolutelayout here?
<ScrollView
HorizontalOptions="Center"
VerticalOptions="Center">
<AbsoluteLayout>
<Frame
x:Name="FrameContainer"
Margin="15"
HorizontalOptions="Center"
BackgroundColor="White">
<StackLayout
IsClippedToBounds="True"
Padding="10, 5"
Spacing="3">
<Image
HorizontalOptions="Center"
x:Name="OctocatImage"
Margin="10"
HeightRequest="150"
WidthRequest="150">
<Image.Source>
<OnPlatform
x:TypeArguments="ImageSource"
Android="github_octocat.png"
iOS="github_octocat.png"
WinPhone="Assets/github_octocat.png"/>
</Image.Source>
</Image>
<Entry
HorizontalOptions="Center"
x:Name="UsernameEntry"
Style="{StaticResource EntryStyle}"
Placeholder="Username" />
<Entry
HorizontalOptions="Center"
x:Name="PasswordEntry"
Style="{StaticResource EntryStyle}"
Placeholder="Password"
IsPassword="True"/>
<Button
Margin="10, 5"
BackgroundColor="#7dbbe6"
HorizontalOptions="Fill"
Clicked="OnLogin"
x:Name="LoginButton"
Text="Login">
<Button.HeightRequest>
<OnPlatform x:TypeArguments="x:Double" Android="50" iOS="30" WinPhone="30"/>
</Button.HeightRequest>
</Button>
</StackLayout>
</Frame>
<ContentView
AbsoluteLayout.LayoutFlags="PositionProportional"
AbsoluteLayout.LayoutBounds="1, 0, -1, -1">
<ContentView.GestureRecognizers>
<TapGestureRecognizer Tapped="OnCloseButtonTapped"/>
</ContentView.GestureRecognizers>
<Image
x:Name="CloseImage"
HeightRequest="30"
WidthRequest="30">
<Image.Source>
<OnPlatform
x:TypeArguments="ImageSource"
Android="close_circle_button.png"
iOS="close_circle_button.png"
WinPhone="Assets/close_circle_button.png"/>
</Image.Source>
</Image>
</ContentView>
</AbsoluteLayout>
</ScrollView>
I just tried with a fresh project and below is how it looks like for me. Close button is always behind the frame. here you can find repro test project
Removed Frame and moved some attributes onto StackLayout. Related bug
https://bugzilla.xamarin.com/show_bug.cgi?id=55744
<?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:test"
x:Class="test.MainPage">
<ContentPage.Resources>
<ResourceDictionary>
<Style x:Key="EntryStyle" TargetType="Entry">
<Setter Property="PlaceholderColor" Value="#9cdaf1"/>
<Setter Property="TextColor" Value="#7dbbe6"/>
</Style>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
<ScrollView
HorizontalOptions="Center"
VerticalOptions="Center">
<AbsoluteLayout>
<StackLayout Margin="15" BackgroundColor="White"
IsClippedToBounds="True"
Padding="10, 5"
Spacing="3">
<Image
HorizontalOptions="Center"
x:Name="OctocatImage"
Margin="10"
HeightRequest="150"
WidthRequest="150">
<Image.Source>
<OnPlatform
x:TypeArguments="ImageSource"
Android="icon.png"
/>
</Image.Source>
</Image>
<Entry
HorizontalOptions="Center"
x:Name="UsernameEntry"
Style="{StaticResource EntryStyle}"
Placeholder="Username" />
<Entry
HorizontalOptions="Center"
x:Name="PasswordEntry"
Style="{StaticResource EntryStyle}"
Placeholder="Password"
IsPassword="True"/>
<Button
Margin="10, 5"
BackgroundColor="#7dbbe6"
HorizontalOptions="Fill"
x:Name="LoginButton"
Text="Login">
<Button.HeightRequest>
<OnPlatform x:TypeArguments="x:Double" Android="50" iOS="30" WinPhone="30"/>
</Button.HeightRequest>
</Button>
</StackLayout>
<ContentView
AbsoluteLayout.LayoutFlags="PositionProportional"
AbsoluteLayout.LayoutBounds="1, 0, -1, -1">
<Image
x:Name="CloseImage"
HeightRequest="30"
WidthRequest="30">
<Image.Source>
<OnPlatform
x:TypeArguments="ImageSource"
Android="close_circle_button.png"
/>
</Image.Source>
</Image>
</ContentView>
</AbsoluteLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage>
It's a bug, set HasShadow="False" on your Frame and it should work.

Resources