Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

W8 Master Detail Back Drill Into/Back

$
0
0

I'm having difficulty understanding the W8 Navigation Pattern. I'm using a MasterDetailPage to navigate through my app. You can drill into several levels and Pop off just fine in iOS and Android, but W8 won't let me drill into the deepest level or use the back button.

My Slideout Menu in my MasterDetailPage responds to ItemSelected

        private void HandleMenuItemSelected (object sender, SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
                return;

            NavigationPage page;
            var menuItem = e.SelectedItem as MenuItem;

            menuItems.TryGetValue (menuItem, out page);

            if (page != null) 
            {
                var evt = MenuItemSelected;

                if (evt != null) 
                {
                    menu.SelectedItem = null;
                    evt (null, new MenuItemSelectedEventArgs { Page = page });
                }
            }
        }

and my MasterDetailPage hooked into the MenuItemSelected event.

                    private void HandleMenuItemSelected (object sender, MenuItemSelectedEventArgs e)
                    {
                        try
                        {
                            Detail = e.Page;
                            ToggleMenuPresented();
                        }
                        catch
                        {
                            // Windows Phone doesn't like this part.
                        }
                    }

The Windows Phone doesn't like this at all. Any suggestions would be greatly appreciated.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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