Explore Features > Image Settings > Image Align |
You can modify the ImageAlign property of the BinaryImage control, to change the alignment of the control in relation to other elements on the web form. The available alignment options are:
Alignment | Description |
---|---|
Left | Aligns the BinaryImage on the left side of the container with text wrapping on the right. |
Right | Aligns the BinaryImage on the right side of the container with text wrapping on the left. |
Baseline | Aligns the lower edge of the BinaryImage with the lower edge of the first line of text in the container. |
Top | Aligns the upper edge of the BinaryImage with the upper edge of the highest element on the same line in the container. |
Middle | Aligns the middle of the BinaryImage with the lower edge of the first line of text in the container. |
Bottom | Aligns the lower edge of the BinaryImage with the lower edge of the first line of text in the container. |
AbsBottom | Aligns the lower edge of the BinaryImage with the lower edge of the largest element on the same line in the container. |
AbsMiddle | Aligns the middle of the BinaryImage with the middle of the largest element on the same line in the container. |
TextTop | Aligns the upper edge of the BinaryImage with the upper edge of the highest text on the same line in the container. |
Complete the following steps to modify the relative alignment of the BinaryImage control.
Set the ImageAlign property in the <cc1:C1BinaryImage>
tag, to modify the relative alignment of the BinaryImage control.
<cc1:C1BinaryImage ID="C1BinaryImage1" runat="server" ImageUrl="~/C1.png" ImageAlign="Right" />
Add the following code to the Page_Load event, to modify the relative alignment of the BinaryImage control.
To write code in C#
C# |
Copy Code
|
---|---|
C1BinaryImage1.ImageAlign=ImageAlign.Right; |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
C1BinaryImage1.ImageAlign=ImageAlign.Right |