Table of Contents

Method GetNormalAndDisabledSvg

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetNormalAndDisabledSvg(SvgImage?, KnownButton?, AbstractControl, int?)

Gets the normal and disabled images as ImageSet from the specified SvgImage and KnownButton.

public static (ImageSet? Normal, ImageSet? Disabled) GetNormalAndDisabledSvg(SvgImage? svg, KnownButton? btn, AbstractControl control, int? size = null)

Parameters

svg SvgImage

The SVG image to process. Optional. If not specified, the SVG image is retrieved based on the known button image.

btn KnownButton?

The known button for which images are retrieved.

control AbstractControl

The control which affects image rendering and is used to get scale factor.

size int?

The size of the image. If not specified, the default size for the toolbar images is used.

Returns

(ImageSet Normal, ImageSet Disabled)

A tuple containing normal and disabled image sets.

GetNormalAndDisabledSvg(string, AbstractControl, SizeI?)

Initializes a tuple with two instances of the ImageSet class from the specified url which contains svg data. Images are loaded for the normal and disabled states using GetSvgColor(KnownSvgColor).

public static (ImageSet Normal, ImageSet Disabled) GetNormalAndDisabledSvg(string url, AbstractControl control, SizeI? size = null)

Parameters

url string

"embres" or "file" url with svg image data.

control AbstractControl

Control which GetSvgColor(KnownSvgColor) method is called to get color information.

size SizeI?

Image size in pixels. If it is not specified, GetDefaultImageSize(AbstractControl?) is used to get image size.

Returns

(ImageSet Normal, ImageSet Disabled)