The ScaleTransform is used to scale (stretch or shrink) an object horizontally or vertically. The ScaleX property is used to specify how much to stretch or shrink the object along the X axis, whereas the ScaleY property is used to specify how much to stretch or shrink the object along the Y axis. Using the CenterX and CenterY properties, the operations are performed based on the center pointing at certain coordinate points.
In this recipe, we will learn how to stretch or shrink an element using the scale transform.