Repository navigation
image properties
vijay@envivo edited this page Oct 3, 2026
·
1 revision
To display images in the UI, decorate the property with the [UI] attribute and specify UiControlType.Image. The framework will automatically render the value as an image, supporting both remote/local file paths and Base64-encoded data.
public class ImageExample
{
/// <summary>
/// The unique Id for this entity
/// </summary>
public Guid Id { get; init; }
/// <summary>
/// Displays a remote or local image file
/// </summary>
[UI(preferredControl: UiControlType.Image)]
public string? ImagePath { get; set; }
/// <summary>
/// Displays an image using the Base64-encoded value
/// </summary>
[UI(preferredControl: UiControlType.Image)]
public string? ImageAsBase64 { get; set; }
}You can populate these properties with a URL or Base64 data:
public ImageExample Create()
{
return new ImageExample
{
ImagePath = @"http://your-domain.com/images/photo.png",
ImageAsBase64 = "data:image/png;base64,<your-data-here>"
};
}Copyright © 2022-2026 Envivo Software
-
Objects
-
Configuring your Model
-
Testing your model
-
Other features