BackgroundColor Transparent isn't so transparent..
See original GitHub issuePlatform (please complete the following information):
- OS: [Android/Both]
- Device: AndroidEmulator/OnePlus 6T
- Sdk vervion: [Android SDK 29]
- Xamarin.Forms: 4.6.0.1073
Applying a shadow to an item at the top of a stack layout. I then have a ListView immediately below it. The idea was to have the list when scrolling look like items are moving underneath the item at the top of the stack layout.
After applying a shadow, the background colour of the item to which the shadow is on top of runs until the end of the shadow. So if something is to pass ‘under’ it, the effect is lost.
Steps to reproduce the behavior: -Add StackLayout with a SearchBar, and then a ListView.
- Apply a white background to the SearchBar and a slightly darker background to the ListView -Add items to the list so it scrolls -Apply a shadow to the SearchBar and set BackgroundColor to Transparent -Scroll screen and notice the darker background proceeds past the end of the shadow
<sh:Shadows BackgroundColor="Transparent" Shades="{sh:SingleShade BlurRadius=3, Offset='0,0', Opacity=0.8, Color=Black}">

Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (10 by maintainers)

Top Related StackOverflow Question
You can thank @dpuckett for this! I always create a implicit style and set all the Row and Column spaces to 0. There shouldn’t be a default value 😀
So it seems this is a bug in XF but not a Shadows related issue:
You can workaround this xf bug by setting Margin=“0,-5” in your list view