Rotate size


I am trying to have a panel with an rotated image inside. Is it a way to have the panel to resize automatically.

I try to rotate a landscape image to portrait. But the panel keep the lanscape size. I could do a script to resize the panel but would know if there is another option.


<Panel Background="#333" Margin="3">
    <Image File="...">
        <Rotation Degrees="90" />

Transforms like Rotation do not influence the layout of the controls, as you point out. As far as I know, there is no way to make it affect layout automatically (and I’m not sure it would totally make sense for quite a few cases, like Move). I think if you’re able to do it by scripting, that is probably the simplest solution.