Qiang thank you very much for the brilliant idea. Below is the actual code that worked in my solution.
@using MudBlazorTraining.Components.Layouts
@inject NavigationManager Navigation
<Router AppAssembly="typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="routeData" DefaultLayout="GetLayoutType()" />
<FocusOnNavigate RouteData="routeData" Selector="h1" />
</Found>
</Router>
@code {
private Type GetLayoutType()
{
if (Navigation.Uri.EndsWith("Tab"))
{
return typeof(TabLayout);
}
else
{
return typeof(MainLayout);
}
}
}