I cannot see, what I am missing. I try to apply my Theme-Info-Color to an icon, but I cannot find out where the Colors object comes from in the example.
In my code I get the error: error CS0103: The name 'Colors' does not exist in the current context
The Colors class is in the Radzen namespace. Make sure you have it in _Imports.razor. Also be sure to use an up-to-date version of Radzen.Blazor as the Colors class was added recently (three months ago).
Thank you for your quick response. Sadly, I had no luck yet.
I am using Radzen Blazor Studio 1.21.1. and I am working on a server-side project.
I have two _Imports.razor files: one in the project root:
Is that a problem or unusal?
I tried to directly use: @using Radzen, @using Radzen.Blazor, @using Radzen.Colors and @using Radzen.Blazor.Colors inside my AddProject.razor file (from which I pasted the code above).
But I always get the same CS0103 error, that Colors does not exist.
I changed my .csproj file and set the .net version to 8.0: <TargetFramework>net8.0</TargetFramework>
and the Radzen.Blazor version to <PackageReference Include="Radzen.Blazor" Version="4.24.2" />
This resolved the issue. Thank you for your help.