Created
November 28, 2022 17:35
-
-
Save vhugogarcia/b49af71df1e339626f758479d836b45a to your computer and use it in GitHub Desktop.
Set gradient background to content page in .NET MAUI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls" | |
ios:Page.UseSafeArea="False"> | |
<FlexLayout Direction="Column" | |
HorizontalOptions="FillAndExpand" | |
VerticalOptions="FillAndExpand"> | |
<FlexLayout.Background> | |
<LinearGradientBrush EndPoint="0,1"> | |
<GradientStop Color="{StaticResource Primary}" | |
Offset="0.1" /> | |
<GradientStop Color="{StaticResource PrimaryAlt}" | |
Offset="1.0" /> | |
</LinearGradientBrush> | |
</FlexLayout.Background> | |
<!-- Content Goes here --> | |
</FlexLayout> | |
</ContentPage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment