I have Professional license. I have set up Fluent theme but when I execute app always show material theme????
Hi @yoander.cabrera,
How did you setup the Fluent theme? You should do so from Radzen Blazor Studio's appearance tab. Do you see the fluent theme CSS files copied in the wwwroot directory of your application?
Yes, I used Radzen Blazor Studio tab and I have fluent files in wwwroot\css. But when execute app continues visualizing the Material theme.
Can you paste the contents of the App.razor file?
Hello, see code.
@inject NavigationManager NavigationManager
@code {
[CascadingParameter]
private HttpContext HttpContext { get; set; }
[Inject]
private ThemeService ThemeService { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
if (HttpContext != null)
{
var theme = HttpContext.Request.Cookies["SapSuiteWebClientTheme"];
if (!string.IsNullOrEmpty(theme))
{
ThemeService.SetTheme(theme, false);
}
}
}
}
You should try clearing the cookies (or run in incognito mode). I suspect the material theme is being restored from the cookie.
Thank you so much. That was the problem
Hello,
I am trying import file with following code. But I get error with EventConsole.
<RadzenFileInput @bind-Value=@photo @bind-FileName=@fileName @bind-FileSize=@fileSize TValue="byte" Style="width: 100%"
Change=@(args => OnChange(args, "FileInput")) Error=@(args => OnError(args, "FileInput")) InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "select file" }})"/>
<EventConsole @ref=@console />
@code {
EventConsole console;
byte photo;
string fileName;
long? fileSize;
void OnChange(byte[] value, string name)
{
console.Log($"{name} value changed");
}
void OnError(UploadErrorEventArgs args, string name)
{
console.Log($"{args.Message}");
}
}
Hi @yoander.cabrera,
I don't understand your question. What is the error you are getting and why do you want to use EventConsole? It is used strictly for demonstration purposes to log events.
Hello,
I want to use RadzenFileInput component for upload file. What is the correct way?
The correct way is shown in our online demo. Just don't copy the event console related code.
Thank you. I will try it.