question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navigation from Master page

See original GitHub issue

Hello,

I have a MenuPage (and MenuPageModel) as Master page. This menu has a list of options with some commands binded.

How can I do for do the navigation (PushAsync) from MenuPageModel? Here is my code.

        var menuPage = FreshPageModelResolver.ResolvePageModel<MenuPageModel>();
        this.Master = menuPage;

        var homePage = FreshPageModelResolver.ResolvePageModel<HomePageModel>();
        this.Detail = new FreshNavigationContainer(homePage);

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mohammad-zrcommented, Jun 10, 2016

Thank you @rid00z for your great work. I use the code you mentioned earlier and it works fine but a problem is master page still showing after clicking on a button that shows another page on detail section. how can i hide master menu?

1reaction
rid00zcommented, Apr 1, 2016

@fcogutierrez

Here’s what you might be trying to do… basically you can get the HomePageModel instance, and pass it into the MenuPageModel, from that instance you can call CoreMethod.PushPageModel.

var homePage = FreshPageModelResolver.ResolvePageModel<HomePageModel>();
this.Detail = new FreshNavigationContainer(homePage);
var homePageModel = homePage.GetModel();

var menuPage = FreshPageModelResolver.ResolvePageModel<MenuPageModel>(homePageModel);
this.Master = menuPage;

homePageModel.CoreMethods.PopToRoot();
homePageModel.CoreMethods.PushPageModel<SecondLevelPage>();

Read more comments on GitHub >

github_iconTop Results From Across the Web

Master Pages and Site Navigation (C#)
Master pages allow for developers to create a site-wide template with designated editable regions. This template can then be applied to ASP.NET ...
Read more >
Tutorial 5: Using Master Pages and Site Navigation
The below tutorial demonstrates how to create and use the new ASP.NET Master Pages and Site Navigation features within VS 2005 Web Application...
Read more >
Creating Master Page in ASP.NET | Adding Navigation ...
In this 3rd tutorial on dynamic web application development, we will learn how to create a master page in ASP.NET.
Read more >
navigation from master to master page in SplitApp
i created a two master pages and two detail pages in splitApp. now irrespective of Detail pages i want to navigate from master...
Read more >
Accessing web forms from Masterpage navigation menu
I am creating a web application in Asp.net and c# where I have a master page in which there is a Left Side...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found