I'm doing the screens of a Xamarin app with XAML, and wanted to put a gradient background is it possible? For now the code is this:
I'm doing the screens of a Xamarin app with XAML, and wanted to put a gradient background is it possible? For now the code is this:
You can use a ready component:
Git: XFGloss: Xamarin.Forms UI Enhancements
Nuget: XFGloss for Xamarin.Forms
<?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:xfg="clr-namespace:XFGloss;assembly=XFGloss"
x:Class="XFGlossSample.Views.AboutPage"
Title="XFGloss Sample App" Padding="10">
<xfg:ContentPageGloss.BackgroundGradient>
<xfg:Gradient Rotation="150">
<xfg:GradientStep StepColor="White" StepPercentage="0" />
<xfg:GradientStep StepColor="White" StepPercentage=".5" />
<xfg:GradientStep StepColor="#ccd9ff" StepPercentage="1" />
</xfg:Gradient>
</xfg:ContentPageGloss.BackgroundGradient>
...
</ContentPage>