I'm trying to get elements to render outside the bounds of their parent panel, in this case I'm using a stack panel.
<StackPanel ClipToBounds="False" Width="200" Orientation="Horizontal" Height="50"
Background="{DynamicResource TierBackground}">
<Rectangle ClipToBounds="False" VerticalAlignment="Bottom" Width="25" Height="75"
Fill="#FF4D6072" />
</StackPanel>
Setting ClipToBounds
doesn't seem to do anything, I first tried it on the Rectangle
and then on the parent Panel though neither seemed to help.
UPDATE
It appears the Canvas
container honours the ClipToBounds
property, but no other container seems to honour this.
UPDATE
I've included an image of what I'm trying to achieve. The brown areas are the inner stack panels which are grouped inside the parent stack panel, see how the gray boxes (representing product positioning) extend past the parent container and cover parent product from tiers above.
This was achieved using multiple canvas' stacked inside a parent StackPanel
with child product elements having their Canvas.Bottom
property set to 0. While this does work it means I have to set each product elements "Left" property and can't have the layout position the product automatically.