ComponentOne BinaryImage for ASP.NET Web Forms
Explore Features / Image Settings / Image Align
In This Topic
    Image Align
    In This Topic

    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.

    In the Designer

    Complete the following steps to modify the relative alignment of the BinaryImage control.

    1. Select the BinaryImage control and click the smart tag to open the BinaryImage Tasks Menu.
    2. Set the ImageAlign property to one of the options listed in the table above.

    In Source View

    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" />

    In Code

    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