Can SkiaSharp.Views.Blazor be used in a BlazorWebView in a Maui Blazor Hybrid app? #3185
-
The SkiaSharp.Views.Blazor nuget lists frameworks such as:
That is, it does not only list web frameworks such as:
I assumed this meant it could be used inside a Maui Am I wrong? Any attempt to use a
(If this should be possible, then I will upload my simple git repo. Though a working sample would be even better.) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
JavaScript [JSImport]/[JSExport] interop with ASP.NET Core Blazor says:
This suggests one of two causes for that fatal error:
|
Beta Was this translation helpful? Give feedback.
The SkiaSharp Blazor components don't work in MAUI unfortunately. On the web, it is WASM so the code is all in the same process, but in Blazor Server and Maui Hybrid, the web control is a separate process.
Where are you planning on using SkiaSharp in the pages? For example, if you want to do photo editing or signature capture or something, you could render a native popup or page or overlay with the SkiaSharp canvas.
I don't expect this to work in Hybrid, because the actual native binary for Blazor is just for WASM. So in a hybrid scenario, we would either need an embedded wasm component or somehow do interop with the native platform. Neither of which I think are supported.
But, I will als…