Transforming in WPF using VB.NET

In this article you will learn how to perform Transforming in WPF.
  • 1479

Transforming: The Transform class provides the means to transform shapes in a two-dimensional plane. To transform a shape, you assign the RenderTransform property to the transform object you want to use. Depending on the transform object you're using, you'll need to fill in different properties to configure it.

A common transform to apply to a shape is a rotation. To rotate a shape, create a RotateTransform and specify its Angle. An Angle of 45 rotates the element 45 degrees clockwise; an angle of 90 rotates the element 90 degrees clockwise; and so on.

Given below example of a TRansformGroup has been used here to combine the effects of two transforms. (Note that the rotation angle is specified in degrees here.)


<Window x:Class="Window1"
    Title="Window1" Height="300" Width="300">
    <StackPanel Orientation="Horizontal">
                <ScaleTransform ScaleX="2" ScaleY="2" />
                <RotateTransform Angle="10" />

Output window



Hope this article help you to understand how to perform Transforming in WPF.


More Articles

© 2020 DotNetHeaven. All rights reserved.