In This Article

MarkupLabelImageUIElement Class

Provides a MarkupLabelUIElement for an image.

public class MarkupLabelImageUIElement : MarkupLabelUIElement, IInputElement, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable
Inheritance:
object MarshalByRefObject MarshalByRefDisposableObject LogicalTreeNodeBase UIElement MarkupLabelUIElement object
Implements:
IInputElement IUIElement ILogicalTreeNode IDpiAwareElement IDisposable

Constructors

MarkupLabelImageUIElement(MarkupLabelElement, Image?)

Provides a MarkupLabelUIElement for an image.

public MarkupLabelImageUIElement(MarkupLabelElement element, Image? image)
Parameter Type Description
element MarkupLabelElement

The MarkupLabelElement that owns this element.

image Image

The image of the element.

Properties

Descent

The descent from the baseline that the element has.

public override int Descent { get; }

Property Value

int

Image

The Image represented by this element.

public Image? Image { get; set; }

Property Value

Image

Methods

DpiScaleChanged(SizeF)

Called when the DPI-based scale factor of the element changes.

public override void DpiScaleChanged(SizeF scaleFactor)
Parameter Type Description
scaleFactor SizeF

The new scale factor where Width is applied to the x-axis, and Height is applied to the y-axis.

See Also

MeasureOverride(Graphics?, Size)

Measures the size in layout required for child elements and determines a size for the element itself.

protected override Size MeasureOverride(Graphics? g, Size availableSize)
Parameter Type Description
g Graphics

The Graphics object to use for measurement.

availableSize Size

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of child element sizes.

Remarks

Element authors should override this method, call Measure(Graphics?, Size) on each visible child element and determine the total size required.

OnRender(PaintEventArgs)

Renders the element.

protected override void OnRender(PaintEventArgs e)
Parameter Type Description
e PaintEventArgs

The event data.

Inherited Members

Extension Methods