1

Basically, I rotated an item:

<Button Content="HelloWorld">
    <Button.RenderTransform>
        <RotateTransform Angle="270" />
    </Button.RenderTransform>
</Button>

How do I get it so that it moves down. Right now it sticks straight up since I rotated it around the 0,0 point. I need it so that the 0,0 point moves down so that the top is where the original top was.

4

1 回答 1

1

添加一个 TranslateTransform:

<Button x:Name="MyButton" Content="HelloWorld">
    <Button.RenderTransform>
        <TransformGroup>
            <RotateTransform Angle="270" />
            <TranslateTransform Y="{Binding ActualWidth, ElementName=MyButton}" />
        </TransformGroup>
    </Button.RenderTransform>
</Button>
于 2011-04-05T15:22:59.043 回答