SfImageEditor allows you to include custom cropping aspect in toolbar. Crop sub toolbar has inbuilt cropping aspect toolbar item such as Free, Original, Square, 3:1, 1:3, 3:2, 2:3, 4:3, 3:4, 5:4 ,4:5, 16:9 and 9:16. You can add custom cropping aspect toolbar item to existing toolbar item collection.
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: To add custom cropping aspect toolbar item to existing toolbar item collection as like below,
Step 3: On Cliking custom toolbar item, ToolbarItemSelected event will be triggered. From this, you can get selected toolbar item as an argument.
Using ToggleCropping(5,7) method, cropping can be performed based on the ratio which is passed in the arguments as like below,
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|