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

Bootstrapper.NavigationService inaccessible due to its protection level #19

Closed
zangai opened this issue Aug 10, 2015 · 2 comments
Closed

Comments

@zangai
Copy link

zangai commented Aug 10, 2015

I am following Jerry's blog article (http://blog.jerrynixon.com/2015/04/implementing-hamburger-button-with.html) about implementing a hamburger menu.

I am aware there could have been some changes over time, but I don't know how to do it otherwise.

It occurs in Shell.xaml.cs

// nav 
        Template10.Mvvm.Command<NavType> _navCommand; 
        public Template10.Mvvm.Command<NavType> NavCommand { get { return _navCommand ?? (_navCommand = new Mvvm.Command<NavType>(ExecuteNav)); } } 
        private void ExecuteNav(NavType navType)
        { 
            var type = navType.Type; 
            var nav = (App.Current as App).NavigationService;
@zangai
Copy link
Author

zangai commented Aug 11, 2015

I checked out the Template10 Project and added it to my solution, and then referenced it. Maybe that is what makes it treat the protected NavigationService property as inaccessible?

@JerryNixon
Copy link
Member

The revised SplitView implementation is getting a shake down right now. By the end of the day, the implementation of Template 10 Minimal will include an RTM-ready version of SplitView. The blog article you are referencing will still technically work, but it's not half as nice as it is here in Template 10. NavigationService, by the way, is passed in as a parameter to the Shell.cs constructor so its protection level in Bootstrapper will not matter anymore.

That being said, I think we changed it back to public. The issue with it being public is that the NavigationService in Bootstrapper will only navigate the primary Frame created automatically by the app. Developers using Tempalte 10 with apps that have more than one frame will need to either keep a reference to the NavigationService they create for their second frame or reference is by way of WindowWrapper.Current(Frame). This doesn't sound relevant to you, but I thought I would mention it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants