-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Enhancement] SkiaSharp Controls #6877
Comments
I love SkiaSharp, but depending on the requirements, the size of SkiaSharp can be important (not sure, I think it's around 5MB?) I think @mattleibow has up to date info on this. |
I think indeed the biggest concern with this is that we have to take on a dependency on SkiaSharp which is really not something we want to do. |
We can create separate library like Xamarin.Forms.Map @andreinitescu @jfversluis |
@andreinitescu I know how much you like SkiaSharp, can we make it more accessible for Xamarin.Forms? |
The idea reminds me this nice Matthew project. If we are talking about facilitate drawing something custom from XAML (shapes, gradients, etc.) it seems as a possible option (among other options). @jfversluis is right about the weight of the dependency, it should be a separate package (Xamarin.Forms.Drawing for example). If the idea is to have the entire set of Xamarin.Forms controls with support in SkiaSharp, we have several important points here.
With this second idea, I suppose it would be interesting to have other features like Page or View tags to choose between use native control or SkiaSharp, etc. |
@juliuszint Yes, I have been thinking about this for about a year. The hardest part is the Layout system. I would like to reuse logic from Grid, StakLayout, FlexLayour. In the second part, I have 90 percent of projects that should look identical between all platforms. |
Yes, when measured in 2017, although reports of 4MB more recently. |
I see two serious ways of going about this.
Either approach would
These are large projects with large advantages. I prefer 2. because it would jettison all the bloat of Xamarin.Forms, which is getting unmaintainable, creating a relatively simple .Net UI layer without Xaml, CSS, Bindings, or Navigation. Those could be recreated on top as an optional package if needed. That would implement @adamped 's suggestion for Saving Xamarin.Forms. |
Here is a sample of SkiaSharp backend for one platform (ios) made by Alexey Strakh |
I also waiting when it will be possible to useSkiaSharp renderers instead of platforms, because it more flexible solution than native renderers ... For example with SkiaSharp renderers it would be possible to use Xamarin.Forms component in the Web, also it will make control more predictable, more testable and so on ... As for me there are lots of advantages |
Also I think it would be better to place these views in just in separate namespace like |
Thanks for this suggestion! As Xamarin.Forms is now in maintenance mode, this will not happen anymore for Xamarin.Forms. We're only adding bugfixes and stability fixes. If this is still important to you, make sure to check the .NET MAUI repo and see if it's already on the roadmap. If not, feel free to open a discussion to discuss a change first or open an issue with a detailed feature request. In this case you might want to check out the https://github.com/dotnet/Microsoft.Maui.Graphics.Controls project. Thanks! |
Summary
I think that the option to draw custom controls and visual elements with the help of SkiaSharp right in xaml in Xamarin.Forms was useful to everyone.
This is a good opportunity to do what Flutter does only in Xamarin.Forms.
API Changes
The text was updated successfully, but these errors were encountered: