ScaleTransform


ScaleTransformHierarchy: DependencyObject Freezable Animatable Transform

         <ScaleTransform             Center="0,0"             ScaleX="2"             ScaleY="2" /> 

or:

     <ScaleTransform             ScaleX="2"             ScaleY="2" >             <ScaleTransform.Center>                 <Point X="0" Y="0" />             </ScaleTransform.Center>         </ScaleTransform> 

<ScaleTransform .../> scales an element by the specified factor. The scaling can be applied in both the x- and y-directions. Example 11-4 applies a scaling transformation to a Rectangle, effectively doubling its size (Figure 11-2).

Figure 11-2. Scaling a Rectangle using ScaleTransform


Attributes


Center (optional)

This attribute represents the center point of the scaling operation. The default is a Point at (0,0).


ScaleX (optional)

This Double value represents the factor by which to scale the width of the element. 1.0 is equivalent to the original size, or 100 percent. A factor of 0.5 would reduce the width by 50 percent, and a factor of 1.5 would increase the width by 150 percent.


ScaleY (optional)

This Double value represents the factor by which to scale the height of the element. 1.0 is equivalent to the original size, or 100 percent. A factor of 0.5 would reduce the height by 50 percent, and a factor of 1.5 would increase the height by 150 percent.




XAML in a Nutshell
XAML in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596526733
EAN: 2147483647
Year: 2007
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net