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

Is there any way to communicate to main layout of blazor pages

$
0
0

Here I want to pass some title to the mainlayout.razor page so that my components or pages can update the title of header. Is there any possible way in blazor to do this ? Any help will be appreciated.

@inherits LayoutComponentBase<div class="page"><div class="sidebar"><NavMenu /></div><div class="main"><div class="top-row px-4 bg-success"><button onclick="toggleNav()"><span class="oi oi-menu"></span></button><div class="text-center">                hey there</div></div><div class="content px-4">            @Body</div></div></div>@code{}

and my child component is a router page with @page directive to navigate between pages i want that component to update this mainlayout is there any possible way ? Thanks in advance for any help.

Regards,


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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