How to move an SVG Icon along a (curvy) path of x/y coordinates in Xamarin.Forms

Erich Brunner 21 Reputation points
2022-04-13T07:48:03.297+00:00

I want to move an SVG Icon or a BoxView for example along a variable path of x/y coordinates. Something like that.

194572-image.png

What's a best pratice technique to accomplish that in Xamarin.Forms?

Developer technologies | .NET | Xamarin
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,126 Reputation points Microsoft External Staff
    2022-04-14T06:33:17.277+00:00

    Hello,

    You could use SkiaSharp to implement the function of moving along a variable path of x/y coordinates.

    Referring to the official documentation The Translate Transform, you could find this object HendecagramAnimationPage.

    You could implement the moving animation by the same way as the sample.

    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.


1 additional answer

Sort by: Most helpful
  1. Erich Brunner 21 Reputation points
    2022-04-20T08:47:13.65+00:00

    Well I already found that sample. But that draws a path. I want to move an object like a BoxView or SVG icon along a path. So the path itself could be invisible. But I guess I already got it. I have to move an object like a BoxView with the Translate(x,y) method , point by point and do it similar to David Ortinau's screencast: https://www.youtube.com/watch?v=Q75npY6MToo to get any arbitrary path into code ;-)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.