LayoutTransform in Windows Phone 8

I wrote about LayoutTransform back when I needed it for Windows 8 XAML development. I modified the existing Silverlight Toolkit code to work with Windows 8 and it was great. Now a lot of people are asking the same question over and over again on StackOverflow - where's LayoutTransform in Windows Phone Toolkit?

Here's an example of that questions:

And I've seen another 2-3 in the last 2-3 weeks.

Well, I don't know where it is, but I know what you can do to get it quickly. My initial idea was - just go to my blog and use the Windows 8 version with slight modifications. But people don't seem to be big fans of that, so I modified it (back) for Silverlight (Windows Phone) and here it is:

The original source code is here: and is under MS-PL license.

Using it is really simple:

<StackPanel Grid.Row="1">  
    <Button Content="First" />
    <Button Content="Second" />
    <Button Content="Third" />
    <common:LayoutTransformer HorizontalAlignment="Left">
            <RotateTransform Angle="-75"/>
        <Button Content="Fourth" />
    <Button Content="Fifth" />
    <Button Content="Sixth" />

Where "common:" simply references the Common folder in the project where LayoutTransformer project is.

The result?

layouttransform in windows phone example


If you like this, share it with others. :)

About Igor Ralic

Software engineer at Microsoft. Running for Office. Passionate about making an impact with great apps & services. Stays close to coffee and away from coriander. Opinions expressed here are my own.