开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜