Group: Forum Members
Last Active: 3 Months Ago
Posts: 7,
Visits: 102
|
If the coner handle of the image in & nbsp ; 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 & nbsp ; RichTextView by mouse ? The image can be resized by code . But the users want to resize it by mouse drag .
|
Group: Forum Members
Last Active: Last Month
Posts: 3,055,
Visits: 4,055
|
Hi & nbsp ; Junghyron , Yes , this behavior is by design and is similar to the behavior found in MS Word . To programmatically set the image dimensions you can use the PreferredWidth and PreferredHeight properties of the shape inline object . The Image inlines example shows how to programmatically resize images . We hope this helps - let us know if you have any questions .
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 3 Months Ago
Posts: 7,
Visits: 102
|
I have checked MS Word. The image dimensions can be resized horizontal or vertical direction only. Also, the ratio between horizontal and vertical directions can be fixed.
In case of NOV RichTextView, If I set the size on both directions (e.g. 50% on horizontal direction, 100% on the others), this ratio is destroyed when the handle is dragged. Should I implement these functions by myself? May I get any idea to do it?
|
Group: Forum Members
Last Active: Last Month
Posts: 3,055,
Visits: 4,055
|
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 & lt ; NNode & gt ; imageInlines = richText . Content . GetDescendants ( NImageInline . NImageInlineSchema ); for ( int i = 0 ; i & lt ; 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
|