Method SetLabelImage
SetLabelImage(SvgImage?, KnownButton?, HVAlignment?, CoordAndUnit?)
Sets the label's image using the specified SVG image, button type, alignment, and size.
public virtual void SetLabelImage(SvgImage? svg, KnownButton? btn = null, HVAlignment? align = null, CoordAndUnit? size = null)
Parameters
svgSvgImageThe SVG image to be displayed on the label. Can be null to remove the current image.
btnKnownButton?The button type that determines the style or context of the image. Can be null for default behavior.
alignHVAlignment?The horizontal and vertical alignment of the image relative to the label. Defaults to null, which uses the label's default alignment.
sizeCoordAndUnit?The size of the image in pixels. Can be null to use the default size.
Remarks
This method updates the label's image and alignment properties. The image is aligned to the right horizontally and centered vertically by default.
SetLabelImage(KnownButtonImage)
Sets the label image for a button using the specified predefined image, button type, alignment, and size.
public virtual void SetLabelImage(KnownButtonImage knownButtonAndImage)
Parameters
knownButtonAndImageKnownButtonImageAn object containing the image parameters.
Remarks
This method simplifies the process of setting a label image by encapsulating the required parameters in a single object.