Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Am I missing an import for ActivatorContent in Blazor (hosted WASM using .NET 6)?

$
0
0

I'm currently working on a self-study project that uses Blazor, and I'm trying to create a page for image uploads (code shown below):

@page "/images/add"<h3>Add Image</h3><MudFileUpload T="IBrowserFile" Accept=".png, .jpg" FilesChanged="UploadFile" MaximumFileCount="100"><ActivatorContent><MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.CloudUpload">            Upload Image</MudButton></ActivatorContent></MudFileUpload>@code {    IList<IBrowserFile> _files = new List<IBrowserFile>();    void UploadFile(IBrowserFile file)    {        _files.Add(file);        // Add image file to storage    }}

This is essentially just following the tutorial page on File Uploads from the MudBlazor website (see here).

However, the <ActivatorContent> tags don't seem to be recognised by my IDE (Visual Studio) and the button does not render when I run the project.

Am I missing an import or a using somewhere? This feels like the fix should be fairly obvious... thanks!


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>