Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Why does Layout.IsClippedToBounds affect sibling (not just children)?

$
0
0

I've got this:

<Grid>
  <MyCustomShadowControl />
  <StackLayout IsClippedToBounds="true">
    <!-- some child controls here -->
  </StackLayout>
</Grid>

The Grid is implicitly 1x1 since no columns or rows are specified. Both children are at the same position in the Grid (0,0). The shadow control is based on NControlView and does some custom rendering of a drop shadow slightly outside its boundaries. The problem is that setting IsClippedToBounds="true" on the StackLayout blocks the shadows from being drawn by the custom control, which is a sibling.

A workaround I found is to wrap the StackLayout in a ContentView. However, it doesn't seem like this should be necessary.

Am I misunderstanding how IsClippedToBounds should work?


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>