question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BackgroundColor Transparent isn't so transparent..

See original GitHub issue

Platform (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}">

Shadow Not Transparent image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
roubachofcommented, Sep 17, 2020

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 😀

1reaction
roubachofcommented, Sep 17, 2020

So it seems this is a bug in XF but not a Shadows related issue:

image

You can workaround this xf bug by setting Margin=“0,-5” in your list view

Read more comments on GitHub >

github_iconTop Results From Across the Web

twitter bootstrap - Background transparent not working
Can you please take a look at this demo and let me know why the CSS rules of background-color: transparent; are not functioning...
Read more >
How to Set Transparent Background Color in CSS
To set transparent background color in CSS, you can use the “background-color” property with rgba value and the “opacity” property.
Read more >
Cycles - transparent background still renders ...
Under Render>Film you can check 'Transparent' and afterwards 'Transparent Glass'. It may be possible that you are using a blender version, ...
Read more >
Set the opacity only to background color not on the text in ...
Set the opacity only to background color not on the text in CSS ... The alpha parameter is a number between 0.0 (fully...
Read more >
How does Transparent color works in CSS?
Transparent color can be applied with background-color property and color. If we take the background color as transparent, it makes the backside ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found