ImageInputT Class

Image file input for forms

Definition

Namespace: MobileTrack.Web.Components.Components
Assembly: MobileTrack.Web.Components (in MobileTrack.Web.Components.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
public sealed class ImageInput<T> : InputComponentBase<T>
where T : class
Inheritance
Object    ComponentBase    InputComponentBaseT    ImageInputT

Type Parameters

T
The model class type derived from IIdLabel

Constructors

ImageInputTInitializes a new instance of the ImageInputT class

Properties

Accessor Accessor for the property
CropImage Whether to crop the image if the aspect ratio of the image isn't of a 1:1 ratio.
ExistingFileDataUrl Base64 data URL for the selected image to render in an img element.
FileName If set, the file will be immediately uploaded when selected and valid. Will be removed if the form isn't submitted afterward.
HasImageError Returns true if the image is invalid
ImageLoaded This method passes the uploaded image, as a base64 string.
Label Label left of the checkbox element
MaxHeightInPixels The maximum height of the image in pixels
MaxWidthInPixels The maximum width of the image in pixels
SelectedFile File selected by the user (or lack thereof)
ToastService Dependency injected Toast Service.
ToolTip Tooltip for the checkbox element

Methods

SetParametersAsync Parameters are loaded manually for sake of performance; if we were to use System.Reflection magic, it would hurt performance if components were used in large numbers.
(Overrides InputComponentBaseTSetParametersAsync(ParameterView))

See Also