Scale transform : Transform « Graphics « Silverlight






Scale transform

Scale transform
   

<UserControl x:Class='SilverlightApplication3.MainPage'
    xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' 
    xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
    xmlns:d='http://schemas.microsoft.com/expression/blend/2008' 
    xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006' 
    mc:Ignorable='d' 
    d:DesignWidth='640' 
    d:DesignHeight='480'>

    <Canvas x:Name="LayoutRoot" Background="White">

        <TextBlock Text="Scale Me!"
                   FontSize="25" 
                   Canvas.Left="50"
                   Canvas.Top="50"/>
        
        <TextBlock Text="Scale Me!" 
                   FontSize="25"
                   Canvas.Left="50"
                   Canvas.Top="100">
            <TextBlock.RenderTransform>
                <ScaleTransform ScaleX="2" />
            </TextBlock.RenderTransform>
        </TextBlock>

        <TextBlock Text="Scale Me!" 
                   FontSize="25"
                   Canvas.Left="50"
                   Canvas.Top="150">
            <TextBlock.RenderTransform>
                <ScaleTransform ScaleY="2" />
            </TextBlock.RenderTransform>
        </TextBlock>
        
                <TextBlock Text="Scale Me!" 
                   FontSize="25"
                   Canvas.Left="50"
                   Canvas.Top="200">
            <TextBlock.RenderTransform>
                <ScaleTransform ScaleY="2" ScaleX="2" />
            </TextBlock.RenderTransform>
        </TextBlock>
        
    </Canvas>

</UserControl>

   
    
    
  








Related examples in the same category

1.Transforming an ObjectTransforming an Object
2.Translate transformTranslate transform
3.Transform demoTransform demo
4.Combine Transforms with TransformGroupCombine Transforms with TransformGroup
5.Scale Transform, Rotate Transform in codeScale Transform, Rotate Transform in code