Skip to content

Instantly share code, notes, and snippets.

@bbenetskyy
Created October 10, 2019 12:11
Show Gist options
  • Save bbenetskyy/72d0bf3886ff6f71679f18d7fb3cda66 to your computer and use it in GitHub Desktop.
Save bbenetskyy/72d0bf3886ff6f71679f18d7fb3cda66 to your computer and use it in GitHub Desktop.
Complex Radial Gradients in XAML
<StackLayout Spacing="0">
<magic:GradientView VerticalOptions="FillAndExpand">
<magic:GradientView.GradientSource>
<magic:RadialGradient Center="0.5,0.5" RadiusX="200" RadiusY="200">
<magic:GradientStop Color="Red" Offset="0" />
<magic:GradientStop Color="Yellow" Offset="0.5" />
<magic:GradientStop Color="Green" Offset="1" />
</magic:RadialGradient>
</magic:GradientView.GradientSource>
</magic:GradientView>
<magic:GradientView VerticalOptions="FillAndExpand">
<magic:GradientView.GradientSource>
<magic:RadialGradient Center="600,600" RadiusX="600" RadiusY="600" Flags="None">
<magic:GradientStop Color="Red" Offset="0" />
<magic:GradientStop Color="Yellow" Offset="0.5" />
<magic:GradientStop Color="Green" Offset="1" />
</magic:RadialGradient>
</magic:GradientView.GradientSource>
</magic:GradientView>
</StackLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment