AppHostBuilderExtensions.UseSkiaSharp Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| UseSkiaSharp(MauiAppBuilder) |
Registers SkiaSharp handlers and services with the MAUI application. |
| UseSkiaSharp(MauiAppBuilder, Boolean, Boolean) |
Registers SkiaSharp handlers and services with options for compatibility mode. |
UseSkiaSharp(MauiAppBuilder)
Registers SkiaSharp handlers and services with the MAUI application.
public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharp(this Microsoft.Maui.Hosting.MauiAppBuilder builder);
Parameters
- builder
- MauiAppBuilder
The MauiAppBuilder to configure.
Returns
The MauiAppBuilder for method chaining.
Remarks
This method registers handlers for SKCanvasView and SKGLView, as well as image source services for SkiaSharp image types.
Applies to
UseSkiaSharp(MauiAppBuilder, Boolean, Boolean)
Registers SkiaSharp handlers and services with options for compatibility mode.
public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharp(this Microsoft.Maui.Hosting.MauiAppBuilder builder, bool registerRenderers, bool replaceHandlers = false);
Parameters
- builder
- MauiAppBuilder
The MauiAppBuilder to configure.
- registerRenderers
- Boolean
Whether to register compatibility renderers for Xamarin.Forms.
- replaceHandlers
- Boolean
Whether to replace existing handlers with SkiaSharp handlers.
Returns
The MauiAppBuilder for method chaining.
Remarks
This overload is used for compatibility scenarios when migrating from Xamarin.Forms.