Add/remove/move elements in canvas on runtime

Juraj Jakubov 21 Reputation points
2022-12-03T08:15:20.437+00:00

I want to build simple application where I am able to manipulate canvas elements on runtime (move, resize, delete, add elements...) but I am confused.
Can I do this with GraphicsView or do I need to use SkiaSharp?
I tried GraphicsView but it seems it cant be achieved.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,144 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,126 Reputation points Microsoft External Staff
    2022-12-05T06:00:15.403+00:00

    Hello,

    I tried GraphicsView but it seems it cant be achieved.

    When you use GraphicsView, you could only redraw the Drawable property each time you need to modify the elements above.

    Therefore, it should be better to use SkiaSharp in your project to implement this feature.

    Please refer to SkiaSharp Graphics in Xamarin.Forms. Although this document is for Xamarin.Forms, the Skia API has not changed on MAUI, and you could refer to it.

    As the matter of fact,

    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 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.