locked
Can you do drop shadows in Xamarin.Forms Shapes? RRS feed

  • Question

  • User391008 posted

    Is there a way to use Xamarin.Forms Shapes to do drop shadow?

    Background: We are currently using SkiaSharp for custom drawing and animations, SkiaSharp is able to do to drop shadows. However it is massive, libSkiaSharp.so is 6.6 MB on arm64-v8a and 5.1 MB on arm32eabi-v7a, together it they add a massive amount to the size of our apks/ipa.

    We are looking at switching to Shapes because it would save us a lot of space. However we need drop shadows and can't see how to do this with Xamarin.Forms Shapes.

    Monday, August 10, 2020 9:35 PM

Answers

  • User369978 posted

    Unfortunately , Xamarin.Forms Shapes does not support drop shadows.

    I'm afraid you have to use SkiaSharp or search for alternatives.

    Actually the size(~ 5MB) of SkiaSharp is small enough for most apps , see the hot topic on github .

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, August 11, 2020 8:29 AM

All replies

  • User369978 posted

    Unfortunately , Xamarin.Forms Shapes does not support drop shadows.

    I'm afraid you have to use SkiaSharp or search for alternatives.

    Actually the size(~ 5MB) of SkiaSharp is small enough for most apps , see the hot topic on github .

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, August 11, 2020 8:29 AM
  • User391008 posted

    Thanks for the answer.

    Please note I wouldn't be asking if I thought SkiaSharp was 'small enough' for our app. I also said nothing about 'most apps' or about the suitableness of SkiaSharp for other apps in general.

    Tuesday, August 11, 2020 8:43 AM
  • User117090 posted

    You could try out the smaller Nuget package PancakeView. This allows you to create objects with shadows, among other things.

    Tuesday, August 11, 2020 9:29 AM
  • User391008 posted

    Thanks andnes,

    PancakeView although nice doesn't do enough for us, We need more then just a content view with adjustable corners and a drop shadow.

    Wednesday, August 12, 2020 2:14 AM
  • User394496 posted

    may be this https://github.com/roubachof/Sharpnado.Shadows can help you

    Wednesday, August 12, 2020 2:21 AM