WPF: how to make a path's size conform to its parent's size
Let's say in blend I take the pen tool and I just create a closed shape.
I'd like to then make this shape's width (or height) stretch to its container's dimensions.
So let's say I have
<Grid Width="500">
开发者_Python百科 <Path Data="Bla Bla" Width="200">
</Grid>
In other words, how can I make the path's width conform to its parent. I try to just go
<Canvas Width="500">
<Path Data="Bla Bla" HorizontalAlignment="Stretch">
</Canvas>
but that doesn't work. it works with a rectangle but not with a path, so how can I do it with a path?
<Viewbox>
<Path .../>
</Viewbox>
精彩评论