Method GetSvgImageAndSize
GetSvgImageAndSize(SvgImage?, KnownButton?, AbstractControl, int?)
Retrieves an SVG image and its associated size based on the provided parameters.
public static (SvgImage? SvgImage, int SvgSize) GetSvgImageAndSize(SvgImage? svg, KnownButton? btn, AbstractControl control, int? size)
Parameters
svgSvgImageAn optional SvgImage instance. If null, the method attempts to retrieve an image based on the
btnparameter.btnKnownButton?An optional KnownButton value used to retrieve a default SVG image if
svgis null.controlAbstractControlThe AbstractControl instance used to determine the default image size if
sizeis not provided.sizeint?An optional size, in pixels, for the SVG image. If null, the default size is determined based on the
controlparameter.
Returns
- (SvgImage SvgImage, int SvgSize)
A tuple containing the resulting SvgImage (or null if no image is available) and the size of the image in pixels.
Remarks
If both svg and btn are null,
the method returns null for the SVG image and the default size determined
by the control parameter.