Forum Xamarin.Forms

Toolbar elevation


(I've seen this issue in other posts, but no good solution or explanation to this problem)

I have a toolbar that gets an elevation in a custom renderer (android) and displays a shadow just as expected. However, when I place a contentview just below the toolbar with the same elevation (set in a custom renderer as well), I still get the shadow from the toolbar drawn ontop of the new contentview. Using visual inspector shows that both the toolbar and the contentview has the same z and elevation. Placing two of the contentviews with the same elevation next to each other does not produce a shadow between them, so something works different with the toolbar. I do not want to create a custom toolbar. I also know that I could make a workaround by setting the elevation of the toolbar to 0 and make sure only the bottom shadow is shown on the contentview, but this doesn't feel right. Any suggestions?

Sign In or Register to comment.