Move Cropping Rectangle

Oliver 21 Reputation points
2022-09-05T11:35:30.517+00:00

Dear Community!

I have another small problem with this tutorial: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/graphics/skiasharp/bitmaps/cropping

How can i move the Rectangle entirely? When you set an aspect Ratio of 1 for example it is very annoying to move the rectangle to the preferred position since you can only do it by stretching the corners. I can't figure out what code i have to add so that i can move the rectangel entirely.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,325 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 39,391 Reputation points Microsoft Vendor
    2022-09-06T09:15:13.36+00:00

    Hello,

    It's impossible to move the cropping rectangle, due to the TouchEffect is only work for corners.

    As a matter of fact, a movable cropping rectangle is implemented through a mask layer, and when the rectangle is moved, the entire mask layer is actually moved.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments