Image in RichTextView does not resized correctly.


Author
Message
Junghyeon Ryu
Junghyeon Ryu
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 7, Visits: 104
If the coner handle of the image in RichTextView is draged by mouse, the image is resized on both Horizontal and Vertical direction.
Top, Bottom, Left, Right handle also show same problem.

Is it bug or intentional behavior?
How can I control or reset the image size in RichTextView by mouse?
The image can be resized by code. But the users want to resize it by mouse drag.
Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Junghyron,

You can control whether images maintain their aspect during resizing using:

someImageInline.MaintainAspect = maintainImageAspect;

To loop through all images in a document you can use the following code:

NList<NNode> imageInlines = richText.Content.GetDescendants(NImageInline.NImageInlineSchema);

for (int i = 0; i < imageInlines.Count; i++)
{
((NImageInline)imageInlines[i]).MaintainAspect = true;
}

Let us know if you meet any problems or have any questions.


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search