Right align the floating image in paragraph

1 Answer 183 Views
WordsProcessing
Adnan
Top achievements
Rank 1
Adnan asked on 14 Oct 2021, 10:19 PM

Hello,

I am exporting the text and image as shown in the attached program. The resulting output shows the text floating around the image which is left aligned:

What I want to achieve now is the reverse of it so that the image gets right-aligned with text aligning to the left and floating around the image on the right.

How do I do that?

Thanks,

Adnan

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 18 Oct 2021, 06:42 AM

Hi Adnan,

You need to set the following properties to achieve the desired alignment:

var image = editor.InsertFloatingImage(ms, "png", new System.Windows.Size((int)100, (int)100));
image.HorizontalPosition.Alignment = RelativeHorizontalAlignment.Right;
image.HorizontalPosition.ValueType = PositionValueType.Alignment;

Detailed information is available here: FloatingImage.

Let me know if I can assist you further.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Adnan
Top achievements
Rank 1
commented on 18 Oct 2021, 11:09 AM

Thanks Dimitar, that did it!
Tags
WordsProcessing
Asked by
Adnan
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or