In the MainLayout.razor page you have a @body which will by default show the control with a @page "/" at the top. I would like to dynamically set it to this page or a different page depending on custom logic.
If I try to set the page at the BlazorWebView control (in MainPage.xaml) it will then show the page but without the layout (MainLayout.razor)
I tried the following in the Routes.razor page too but it did not work:
@inject NavigationManager _NavigationManager<Router AppAssembly="@typeof(MauiProgram).Assembly"><Found Context="routeData"><RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" /><FocusOnNavigate RouteData="@routeData" Selector="h1" /></Found></Router>@code { protected override void OnInitialized() { //this would have logic to set startupPage in reality var startupPage = "/help"; _NavigationManager.NavigateTo(startupPage); }}So just to reiterate. I would like the @body to render as an initial page what I want depending on logic and not the @page "/" page
Thanks