Table of Contents

Method AddPictureCore

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

AddPictureCore(ImageSet?, ImageSet?, string?, bool)

Creates and adds a new PictureBox control with the specified properties.

public virtual PictureBox AddPictureCore(ImageSet? image = null, ImageSet? imageDisabled = null, string? toolTip = null, bool ignoreSuggestedSize = false)

Parameters

image ImageSet

The ImageSet to use as the primary image for the PictureBox. Can be null.

imageDisabled ImageSet

The ImageSet to use as the disabled image for the PictureBox. Can be null.

toolTip string

The tooltip text to display when the user hovers over the PictureBox. Defaults to an empty string if null.

ignoreSuggestedSize bool

A value indicating whether to ignore the suggested size for the PictureBox. If true, the control will not use the suggested size; otherwise, the suggested size and minimum size will be applied.

Returns

PictureBox

A PictureBox control configured with the specified properties. The control is added to the current parent context.

Remarks

This method initializes a PictureBox with default alignment and properties, applies the specified images and tooltip, and optionally configures the size based on the suggested size. The PictureBox is associated with the current parent context and updated with item-specific properties.