Table of Contents

Method SetSvg

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

SetSvg(SvgImage?, KnownButton?, CoordAndUnit?)

Sets the SVG image for a toolbar button, along with its corresponding disabled state image.

public virtual void SetSvg(SvgImage? svg, KnownButton? btn, CoordAndUnit? size)

Parameters

svg SvgImage

The SvgImage to use as the base image. Can be null to clear the current image.

btn KnownButton?

The KnownButton representing the toolbar button to associate with the image. Can be null if no specific button is targeted.

size CoordAndUnit?

An optional CoordAndUnit specifying the desired size of the image. If null, the default size is used.

Remarks

This method generates both the normal and disabled state images for the specified toolbar button based on the provided SVG image. If svg is null, the images for the button will be cleared.