Applying ScaleTransform
ScaleTransform
enables dynamically resizing a control. The following code demonstrates how a ListBox
can be scaled to different dimensions:
Notice how scaling is expressed in percentage with the ScaleX
and ScaleY
properties. A value of 0.6 means that the control is scaled to 60% of its original dimensions. A value of 1 means 100% (that is, the original size), whereas a value bigger than 1 enlarges the visual element. Take a look at the upper-right cell in Figure 33.11 to get an idea about the result. With animations, ScaleTransform
enables animating visual elements by making them larger or smaller.
Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.