Interface IImage
Represents a decoded, GPU-resident image. Acts as a self-loading resource handle —
analogous to HTMLImageElement in the browser.
Acquire instances via GetService(typeof(IImage)) on any View.
Then set the source with Load(string) (sync-if-cached) or LoadAsync(string)
for first-time remote or large assets.
public interface IImage
Properties
Size
Intrinsic size of the image in points. Returns Empty until loaded.
Size Size { get; }
Property Value
Methods
Load(string)
Loads the image from uri.
Returns immediately if the image is already in the platform catalog.
For local packaged assets this may block on first call; prefer LoadAsync(string)
for anything that could be slow.
void Load(string uri)
Parameters
uristring
LoadAsync(string)
Loads the image from uri on a background thread.
The returned task completes once the image is decoded and GPU-resident.
Subsequent Load(string) calls with the same URI return instantly from cache.
Task LoadAsync(string uri)
Parameters
uristring