We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to load shapes with custom bounds?

SfImageEditor allows you to load shapes with custom bounds. You can define the location where the shapes need to be placed initially.


Step 1: Create image editor sample with all necessary assemblies.


Please refer the below link to create a simple SfImageEditor sample along with the ways to configure it.



Step 2: You can load any shapes (Circle, Rectangle and Text) with custom Bounds using AddShape method with parameter as specific shape type and PenSettings to set Bounds for shapes. Using Bounds property, you can position the shapes on the image at any place based on the given frame as like below,



Note: Bounds value (e.g. Bounds = new Rectangle (0, 0, 30, 30)) is represented by X position, Y position, width and height should be in percentage ranges from 0 to 100.


Similarly using AddText method, we can place the text in custom location like below code snippet.



Note: If Bounds value is empty, then shapes will be placed on the center of the image.


Sample Link:






Article ID: Published Date: Last Revised Date: Platform: Control:
8857 06/19/2018 06/29/2018 Xamarin.Forms SfImageEditor
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon