渐变作为按钮 BorderColor Xamarin Android?

Gradient as a Buttons BorderColor Xamarin Android?

我正在尝试在 Xamarin Forms 中创建一个带有渐变边框颜色的按钮,我在下面找到 IOS 的解决方案,但我找不到 android 的任何解决方案,有人可以帮助我吗?

您可以使用提供渐变边框的PancakeView,并添加触摸手势识别器:

<yummy:PancakeView 
    BackgroundColor="#e2e885" 
    BorderGradientStops="{StaticResource Rainbow}" 
    HeightRequest="150" 
    CornerRadius="40,10,40,10" 
    BorderThickness="4" 
    BorderColor="#456287">
    <yummy:PancakeView.GestureRecognizers>
        <TapGestureRecognizer Command="{Binding OnTapCommand}" NumberOfTapsRequired="1" />
    </yummy:PancakeView.GestureRecognizers>
    <Label Text="Button text" HorizontalOptions="Center" VerticalOptions="Center" />
</yummy:PancakeView>