Table of Contents

Class ImageView

Namespace
Xui.Core.UI
Assembly
Xui.Core.dll

A view that displays an image. Works like HTMLImageElement: it holds an IImage handle (acquired from the service chain) and sets its source via Load(string). The platform catalog handles caching and device-lost rehydration transparently.

public class ImageView : View, ILayerHost, IServiceProvider
Inheritance
ImageView
Implements
Inherited Members
Extension Methods

Properties

Source

Gets or sets the URI of the image to display. Setting this property triggers a load if the view is already active.

public string? Source { get; set; }

Property Value

string

Methods

MeasureCore(Size, IMeasureContext)

Returns the desired border-edge size given the available border-edge space. Margin, min/max clamping, and fixed-size short-circuit are handled by MeasureShell(ref LayoutGuide).

protected override Size MeasureCore(Size availableBorderEdgeSize, IMeasureContext context)

Parameters

availableBorderEdgeSize Size
context IMeasureContext

Returns

Size

OnActivate()

Called when this view becomes active — it will receive events, render, and animate. Override this to start animations, subscribe to data sources, or acquire resources.

protected override void OnActivate()

OnDeactivate()

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel's recycle pool).

protected override void OnDeactivate()

RenderCore(IContext)

Draws this view's content and recurses into children.

protected override void RenderCore(IContext context)

Parameters

context IContext