Stretching a control to fill a Silverlight Canvas
- by skb
I have a canvas like this:
<Canvas>
<Rectangle Fill="Blue" Opacity="0.5" Canvas.ZIndex="1" />
<Grid Canvas.ZIndex="0" >
...bla bla bla...
</Grid>
</Canvas>
I need the Width/Height of the Canvas to just stretch to the Width/Height of the Grid, but then I need the Width/Height of the Rectangle to stretch to match. Is this possible? How do I do it?