May 31, 2011

Code Sample for Transformation in WPF



<Page x:Class="TestWPF.ExTransofrm"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ExTransofrm">
    <Grid>
       
        <TextBlock Text=" TRANSFORM TEXT" FontSize="20" FontWeight="Bold">
            <TextBlock.RenderTransform >
                <TransformGroup >
                    <RotateTransform Angle=" 45"></RotateTransform>
                    <SkewTransform AngleX=" 20" AngleY=" 20"></SkewTransform>
                    <TranslateTransform X="20" Y="60"></TranslateTransform>
                    <ScaleTransform ScaleX="1" ScaleY="1"></ScaleTransform>
                    
                    
                </TransformGroup>
             </TextBlock.RenderTransform>
            
     
        </TextBlock>
    </Grid>
</Page>

Below will be the transformed TextBlock

No comments:

Post a Comment