Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xamarin crossplatform canvas

Tags:

c#

canvas

xamarin

I am investigating Xamarin as an option for our crossplatform solution. For us it is critical that we can create our own custom interactive controls.

The examples (http://devcenter.wintellect.com/jprosise/supercharging-xamarin-forms-with-custom-renderers-part-5) I've seen show how to create custom rendered controls. Unfortunately they all essentially show how to render to Canvas differently depending on platform. This is not acceptable for us.

Is there a true crossplatform way to create Xamarin custom rendered controls without writing same drawing logic in each platform specific implementation?

like image 925
Yuri Vovchenko Avatar asked Mar 12 '23 01:03

Yuri Vovchenko


1 Answers

I recently had to make the same decision and eventually I decided for SkiaSharp.

  • SkiaSharp is a .NET binding to the Skia library and inherits the features and power of this library so in a way it's also possible to benefit of the original Skia documentation/examples/community
  • SkiaSharp uses what actually powers Android and Chrome. Also, there is a hardware/GPU accelerated canvas and views.
  • The only reason to prefer NGraphics it was the support for SVG but now from version 1.55 released on November 2016, SkiSharp support loading .svg files.
  • Xamarin also published libraries for Xamarin.Forms and for Xamarin Android and iOS platform (SkiaSharp Views & Layers)
  • Any Xamarin product has the support offered not just through Github but also Xamarin Website and Forum and Xamarin users community.
  • With Xamarin there are better chance of the development and improvement of the library in the future.
  • A single developer might have difficulties to improve or keep active the project for years.
like image 194
Daniele D. Avatar answered Apr 01 '23 08:04

Daniele D.