I have a path (looks like an oval):
<Path Data="Bla Bla"/>
Now I want to scale the path's width and height to whatever I like. I found a way:
<Grid Width="400" Height="50"> <Viewbox Stretch="Fill"> <Path Data="Bla Bla"/> </Viewbox> </Grid>
And this works, but I'm wondering if this is the most efficient way to do this? (I had to introduce a grid and viewbox to do this)
Another way to Scale a Path is to use RenderTransform
or LayoutTransform
<Path Data="Bla Bla" RenderTransformOrigin="0.5, 0.5"> <Path.RenderTransform> <ScaleTransform ScaleX="1.5" ScaleY="1.5"/> </Path.RenderTransform> </Path>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With