Hello I got an error while doing login page. I just code Mainpage.xaml file other files are default and I picked "blank" when creating project. My error is:
" System.InvalidOperationException: "The class, property, or method you are attempting to use ("GradientBrush" is part of GradientBrush; to use it, you must opt-in by calling Forms.SetFlags("Brush_Experimental") before calling Forms.Init()."
I just write one file which is Mainpage.xaml
. Does anybody help me how to handle my problem?
<?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="HealthCareApp.MainPage">
<StackLayout>
<StackLayout.Background>
<LinearGradientBrush EndPoint="0,1">
<GradientStop Color="#48b6a6" Offset="0.1" />
<GradientStop Color="#2b78d4" Offset="1.0" />
</LinearGradientBrush>
</StackLayout.Background>
<StackLayout Padding="0" Margin="10,100,10,0" HorizontalOptions="FillAndExpand" >
<Frame BackgroundColor="Transparent" HeightRequest="500" Padding="0" Margin="0">
<StackLayout>
<StackLayout Margin="10">
<Label Text="SIGN IN" TextColor="White" HorizontalOptions="CenterAndExpand" FontAttributes="Bold" ></Label>
</StackLayout>
<StackLayout Padding="0" Margin="15,10">
<Frame BackgroundColor="Transparent" BorderColor="White" Padding="0" HorizontalOptions="FillAndExpand" CornerRadius="30">
<StackLayout Orientation="Horizontal">
<Frame BackgroundColor="SkyBlue" HeightRequest="40" WidthRequest="40" CornerRadius="30" Padding="0" Margin="5">
<Image Source="https://www.findool.com/images/avatars/avatar.png" Aspect="AspectFill" Margin="0"/>
</Frame>
<Entry Placeholder="Email" TextColor="#666666" FontAttributes="None" HorizontalOptions="FillAndExpand" Margin="0,0,20,0"/>
</StackLayout>
</Frame>
<Frame BackgroundColor="Transparent" BorderColor="White" Margin="0,15,0,0" Padding="0" HorizontalOptions="FillAndExpand" CornerRadius="30">
<StackLayout Orientation="Horizontal">
<Frame BackgroundColor="SkyBlue" HeightRequest="40" WidthRequest="40" CornerRadius="30" Padding="0" Margin="5">
<Image Source="https://images.all-free-download.com/images/graphicthumb/lock_icon_6813906.jpg" Aspect="AspectFill" Margin="0"/>
</Frame>
<Entry Placeholder="Password" IsPassword="True" TextColor="White" FontAttributes="None" HorizontalOptions="FillAndExpand" Margin="0,0,20,0"/>
</StackLayout>
</Frame>
<StackLayout Orientation="Horizontal">
<CheckBox IsChecked="False" Color="White" />
<Label Text="Remember me" TextColor="White" FontSize="Small" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" />
<Label Text="Forgot Password" TextColor="White" FontAttributes="Bold" HorizontalOptions="EndAndExpand" FontSize="Small" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" />
</StackLayout>
<Button Text="SIGN IN" BackgroundColor="#2b78d4" TextColor="White" CornerRadius="30" />
<StackLayout Orientation="Horizontal" HorizontalOptions="CenterAndExpand">
<Label Text="Still Not Connected ?" TextColor="White" FontSize="Small"/>
<Label Text="Sign Up" TextColor="White" FontAttributes="Bold" FontSize="Small"/>
</StackLayout>
<StackLayout Margin="0,25,0,0" Padding="0">
<Grid>
<BoxView BackgroundColor="White" HeightRequest="1" WidthRequest="150" HorizontalOptions="Center" VerticalOptions="Center"/>
<Frame BackgroundColor="White" HeightRequest="45" WidthRequest="45" CornerRadius="45" HasShadow="False" BorderColor="White" Margin="0" HorizontalOptions="Center" Padding="0">
<Label Text="OR" TextColor="White" FontSize="Small" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"/>
</Frame>
</Grid>
</StackLayout>
<StackLayout Margin="0,25" Orientation="Horizontal" HorizontalOptions="CenterAndExpand">
<Frame BackgroundColor="White" HeightRequest="45" WidthRequest="45" CornerRadius="45" HasShadow="False" BorderColor="White" Margin="0" HorizontalOptions="Center" Padding="0">
<Image Source="https://www.pngitem.com/pimgs/m/44-440455_transparent-background-fb-logo-hd-png-download.png" Aspect="AspectFill" Margin="0"/>
</Frame>
<Frame BackgroundColor="White" HeightRequest="45" WidthRequest="45" CornerRadius="45" HasShadow="False" BorderColor="White" Margin="0" HorizontalOptions="Center" Padding="0">
<Image Source="https://blog.hubspot.com/hubfs/image8-2.jpg" Aspect="AspectFill" Margin="0"/>
</Frame>
</StackLayout>
</StackLayout>
</StackLayout>
</Frame >
</StackLayout>
</StackLayout >
</ContentPage>