Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the color of shadow's Frame in Xamarin forms?

Is there a way to change the shadow color of the Xamarin Forms Frame element?

like image 964
Salvo Avatar asked Jan 28 '26 01:01

Salvo


1 Answers

You can either achieve it with custom renderers, or use RedCorner Nuget

They have a custom frame (Frame2) with several options, including Frame Shadow Color

Here is a sample image :

enter image description here

Usage:

<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>

You can read more in the official documentation.

like image 85
Bruno Caceiro Avatar answered Jan 30 '26 18:01

Bruno Caceiro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!