Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenFileInput<TValue>

    RadzenFileInput component.

    Inheritance
    System.Object
    RadzenComponent
    FormComponent<TValue>
    RadzenFileInput<TValue>
    Implements
    IDisposable
    IRadzenFormComponent
    Inherited Members
    FormComponent<TValue>.Name
    FormComponent<TValue>.TabIndex
    FormComponent<TValue>.Placeholder
    FormComponent<TValue>.Disabled
    FormComponent<TValue>.EditContext
    FormComponent<TValue>.Form
    FormComponent<TValue>.ValueChanged
    FormComponent<TValue>.HasValue
    FormComponent<TValue>.IsBound
    FormComponent<TValue>._value
    FormComponent<TValue>.Value
    FormComponent<TValue>.Change
    FormComponent<TValue>.FieldIdentifier
    FormComponent<TValue>.ValueExpression
    FormComponent<TValue>.Dispose()
    FormComponent<TValue>.GetValue()
    FormComponent<TValue>.OnContextMenu(MouseEventArgs)
    FormComponent<TValue>.GetClassList(String)
    FormComponent<TValue>.FormFieldContext
    FormComponent<TValue>.CurrentPlaceholder
    FormComponent<TValue>.FocusAsync()
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, Int32)
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.OnInitialized()
    RadzenComponent.Reference
    RadzenComponent.RaiseContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.CurrentStyle
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenFileInput<TValue> : FormComponent<TValue>, IDisposable, IRadzenFormComponent
    Type Parameters
    Name Description
    TValue

    The type of the value.

    Examples
    <RadzenFileInput @bind-Value=@employee.Photo TValue="string" Change=@(args => Console.WriteLine($"File content as base64 string: {args}")) />

    Fields

    fileUpload

    Gets file input reference.

    Declaration
    protected ElementReference fileUpload
    Field Value
    Type Description
    ElementReference

    Properties

    Accept

    Gets or sets the comma-separated accepted MIME types.

    Declaration
    public string Accept { get; set; }
    Property Value
    Type Description
    System.String

    The comma-separated accepted MIME types.

    ChooseText

    Gets or sets the choose button text.

    Declaration
    public string ChooseText { get; set; }
    Property Value
    Type Description
    System.String

    The choose button text.

    DeleteText

    Gets or sets the delete button text.

    Declaration
    public string DeleteText { get; set; }
    Property Value
    Type Description
    System.String

    The delete button text.

    Error

    Gets or sets the error callback.

    Declaration
    public EventCallback<UploadErrorEventArgs> Error { get; set; }
    Property Value
    Type Description
    EventCallback<UploadErrorEventArgs>

    The error callback.

    FileName

    Gets or sets the image file name.

    Declaration
    public string FileName { get; set; }
    Property Value
    Type Description
    System.String

    The image file name.

    FileNameChanged

    Gets or sets the FileName changed.

    Declaration
    public EventCallback<string> FileNameChanged { get; set; }
    Property Value
    Type Description
    EventCallback<System.String>

    The FileName changed.

    FileSize

    Gets or sets the image file size.

    Declaration
    public long? FileSize { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int64>

    The image file size.

    FileSizeChanged

    Gets or sets the FileSize changed.

    Declaration
    public EventCallback<long?> FileSizeChanged { get; set; }
    Property Value
    Type Description
    EventCallback<System.Nullable<System.Int64>>

    The FileSize changed.

    ImageAlternateText

    Gets or sets the text.

    Declaration
    public string ImageAlternateText { get; set; }
    Property Value
    Type Description
    System.String

    The text.

    ImageClick

    Gets or sets the image click callback.

    Declaration
    public EventCallback<MouseEventArgs> ImageClick { get; set; }
    Property Value
    Type Description
    EventCallback<MouseEventArgs>

    The image click callback.

    ImageStyle

    Gets or sets the image style.

    Declaration
    public string ImageStyle { get; set; }
    Property Value
    Type Description
    System.String

    The image style.

    InputAttributes

    Specifies additional custom attributes that will be rendered by the input.

    Declaration
    public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
    Property Value
    Type Description
    IReadOnlyDictionary<System.String, System.Object>

    The attributes.

    MaxFileSize

    Gets or sets the maximum size of the file.

    Declaration
    public int MaxFileSize { get; set; }
    Property Value
    Type Description
    System.Int32

    The maximum size of the file.

    MaxHeight

    Gets or sets the maximum height of the file, keeping aspect ratio.

    Declaration
    public int MaxHeight { get; set; }
    Property Value
    Type Description
    System.Int32

    The maximum height of the file.

    MaxWidth

    Gets or sets the maximum width of the file, keeping aspect ratio.

    Declaration
    public int MaxWidth { get; set; }
    Property Value
    Type Description
    System.Int32

    The maximum width of the file.

    Title

    Gets or sets the title.

    Declaration
    public string Title { get; set; }
    Property Value
    Type Description
    System.String

    The title.

    Methods

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    System.String
    Overrides
    RadzenComponent.GetComponentCssClass()

    OnAfterRenderAsync(Boolean)

    Called by the Blazor runtime.

    Declaration
    protected override async Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender
    Returns
    Type Description
    Task
    Overrides
    RadzenComponent.OnAfterRenderAsync(Boolean)

    OnChange(IEnumerable<PreviewFileInfo>)

    Called on file change.

    Declaration
    public async Threading.Tasks.Task OnChange(IEnumerable<PreviewFileInfo> files)
    Parameters
    Type Name Description
    IEnumerable<PreviewFileInfo> files

    The file.

    Returns
    Type Description
    System.Threading.Tasks.Task

    OnImageClick(MouseEventArgs)

    Handles the ImageClick event.

    Declaration
    public async Task OnImageClick(MouseEventArgs args)
    Parameters
    Type Name Description
    MouseEventArgs args

    The instance containing the event data.

    Returns
    Type Description
    Task

    SetParametersAsync(ParameterView)

    Sets the parameters asynchronous.

    Declaration
    public override async Task SetParametersAsync(ParameterView parameters)
    Parameters
    Type Name Description
    ParameterView parameters

    The parameters.

    Returns
    Type Description
    Task

    Task.

    Overrides
    Radzen.FormComponent<TValue>.SetParametersAsync(ParameterView)

    Implements

    IDisposable
    IRadzenFormComponent

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT