Linear and radial gradient brushes, as well as solid brushes, can be used to paint backgrounds and other options in Xamarin.Forms. Here I use a linear brush to paint the background of a Frame container and a Button.
<Color x:Key="DarkBlue">#0091FF</Color> | |
<Color x:Key="LightBlue">#32C5FF</Color> | |
<LinearGradientBrush x:Key="BlueGradient" StartPoint="0,0" EndPoint="1,1"> | |
<GradientStop Color="{StaticResource DarkBlue}" Offset="0.5" /> | |
<GradientStop Color="{StaticResource LightBlue}" Offset="1.0" /> | |
</LinearGradientBrush> |
Resources:
davidortinau
/
PersonalFinanceSample
exploring Shapes and Gradients with Xamarin.Forms 4.8 pre-release
Personal Finance Sample
This sample layout is exploring new Gradient Brush and Shapes features from Xamarin.Forms 4.8-pre2.
Top comments (0)