The latest version of
Frame2, an extended version of
Xamarin.Forms.Frame which provides additional bindable properties to adjust the shadow radius (aka distance or elevation) and color:
Frame2, first you have to include the
RedCorners.Forms namespace in your XAML:
Afterwards, you can use a
rf:Frame2 tag and set its
ShadowColor properties to adjust the shadows:
<rf:Frame2 HasShadow="True" ShadowRadius="20" ShadowColor="Red" BackgroundColor="White"> <Grid HorizontalOptions="Fill" HeightRequest="100"> <Label HorizontalOptions="Center" VerticalOptions="Center" Text="Hello, World" /> </Grid> </rf:Frame2>
One issue I experienced was setting high values for
ShadowRadius made the whole iOS system crash! So make sure you know what you’re doing.
Note that since the algorithms are different on each platform, the same values would produce different looking shadows. So it is advised that you provide different values for each platform and test the results.