Scaling helps in resizing (reducing and enlarging the size) of an image by changing the number of pixels in the image. Bitmap provides Scaler class for scaling an image. The Scaler class requires three properties to scale an image, which are as follows:
The GIF given below shows scaling in and out of an image.
![]() |
The following code implements scaling in on a button click event and scaling out on another button's click event. The example uses the sample created in Quick Start.