I am trying to create a ring like this:
(credits)
So here are my attemps:
<Ellipse StrokeThickness="50"
WidthRequest="300"
HeightRequest="300"
Grid.Column="0">
<Ellipse.Stroke>
<LinearGradientBrush>
<GradientStop Color="Red"
Offset="0.1" />
<GradientStop Color="DarkBlue"
Offset="1.0" />
</LinearGradientBrush>
</Ellipse.Stroke>
</Ellipse>
This would be good, but I am unable to add text to the center. Furthermore this hole thing have to be clickable.
<Button Text="42"
FontSize="50"
TextColor="Black"
BorderColor="Chartreuse"
Background="Transparent"
CornerRadius="300"
WidthRequest="300"
HeightRequest="300"
BorderWidth="50">
</Button>
I think the way to go is to use a button. Unfortunately the BorderColor do not accept a gradient like above.
I tried the same with a Frame Control, but that doesnt accept a gradient in BorderColor too!
I found some examples for iOS and UWP which use custom renderers, but not for Android. Also they hard code the gradient, which I don't want. I want to be able to change the gradient colors based on the values in the middle.
Maybe someone can guide me in the right direction?


