Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Theme cascading value to pass across rendermode boundaries #5476

Open
mtbayley opened this issue Apr 23, 2024 · 1 comment
Open

Allow Theme cascading value to pass across rendermode boundaries #5476

mtbayley opened this issue Apr 23, 2024 · 1 comment
Labels
Type: Feature ⚙ Request or idea for a new feature.

Comments

@mtbayley
Copy link

mtbayley commented Apr 23, 2024

As explained by this comment, it would be nice for the Theme cascading value be added by a method in the Blazorise library.

dotnet/aspnetcore#50724 (comment)

I am currently porting components from a Blazor Server App to a Blazor web app and am not able to get the Theme cascading value when defined like this

<Blazorise.ThemeProvider Theme="@theme">
    <Router AppAssembly="typeof(App).Assembly">
        <Found>...</Found>
        <NotFound>...</NotFound>
    </Router>
</Blazorise.ThemeProvider>

I had to do something similar with AuthenticationState by calling .AddCascadingAuthenticationState()
https://learn.microsoft.com/en-us/aspnet/core/blazor/security/?view=aspnetcore-8.0#troubleshoot-errors

@mtbayley mtbayley added the Type: Feature ⚙ Request or idea for a new feature. label Apr 23, 2024
@stsrki
Copy link
Collaborator

stsrki commented Apr 24, 2024

As far as I can see, the AddCascadingAuthenticationState is only available in .NET 8, which makes it quite limiting. We still must support .NET 6 & 7.

For 2.0 we plan to drop older frameworks so we might consider adding this at that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants