The ResizeMode property determines whether the BinaryImage should be resized automatically if the Height and Width are set in pixels. BinaryImage supports three Resize Modes:
This topic demonstrates how to change resize modes and how they appear in the output.
to open the BinaryImage Tasks Menu.Set the Height, Width and ReziseMode in the <cc1:C1BinaryImage> tag to resize the BinaryImage control.
<cc1:C1BinaryImage ID="C1BinaryImage1" runat="server" ImageUrl="~/Koala.png" Height="100px" ResizeMode="Fit" Width="100px" />
Add the following code to the Page_Load event, to resize to the BinaryImage control:
To write code in C#
| C# |
Copy Code
|
|---|---|
| C1BinaryImage1.Height = 100; C1BinaryImage1.Width = 100; C1BinaryImage1.ResizeMode = C1.Web.Wijmo.Controls.C1BinaryImage.ImageResizeMode.Fit; |
|
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
| C1BinaryImage1.Height = 100 C1BinaryImage1.Width = 100 C1BinaryImage1.ResizeMode = C1.Web.Wijmo.Controls.C1BinaryImage.ImageResizeMode.Fit |
|
When you run the project, notice that the image has been resized according to the Resize Mode.
Original Image:

The following image shows how the image appears in Fit mode:

The following image shows how the image appears in Fill mode:

The following image shows how the image appears in Crop mode:
