Table of Contents

Method ImageSourceFromSvg

Namespace
Alternet.UI
Assembly
Alternet.UI.Maui.dll

ImageSourceFromSvg(SvgImage?, int, bool, bool)

Creates ImageSource from the specified SvgImage.

public static SKBitmapImageSource? ImageSourceFromSvg(SvgImage? svgImage, int sizeInPixels, bool isDark, bool isDisabled = false)

Parameters

svgImage SvgImage

Svg image.

sizeInPixels int

Image size in pixels.

isDark bool

Whether background is dark.

isDisabled bool

Whether to use disabled or normal color for the single color SVG images.

Returns

SKBitmapImageSource

ImageSourceFromSvg(SvgImage?, int, bool)

Creates ImageSource with disabled images from the specified SvgImage.

public static (SKBitmapImageSource Light, SKBitmapImageSource Dark)? ImageSourceFromSvg(SvgImage? svgImage, int sizeInPixels, bool isDisabled = false)

Parameters

svgImage SvgImage

The SVG image to convert.

sizeInPixels int

The size of the image in pixels.

isDisabled bool

Whether to use disabled or normal color for the single color SVG images.

Returns

(SKBitmapImageSource Light, SKBitmapImageSource Dark)?

A tuple containing the light and dark SKBitmapImageSource with disabled images.