uwp - Template 10: Hide HamBurgerMenu if no internet -


i devloping uwp app in if there no internet user shown error no internet connection @ start.so checked internet connection if not did in app.xaml.:

 public override async task onstartasync(startkind startkind, iactivatedeventargs args)     {         // long-running startup tasks go here         await task.delay(timespan.fromseconds(6));              if (!nointernet)             {                   navigationservice.navigate(typeof(views.error));             }                          }                  await task.completedtask;     } 

now when no internet connection there navigates error page hamburgermenu still visible.how hide hamburgermenu.?i using hamburgermenu template of template10.thanks in advance!.

i ran similar problem app.assuming have not edited shell.xaml.cs , hamburgermenu name,just add shall.xaml.cs

   public hamburgermenu _thamburgermenu     {         { return myhamburgermenu;}          set { myhamburgermenu = value;}     } 

and app.xaml.cs should this:

public override async task onstartasync(startkind startkind, iactivatedeventargs args) {     // long-running startup tasks go here     await task.delay(timespan.fromseconds(6));          if (!nointernet)         {              shell.instance._thamburgermenu.isfullscreen = true;              navigationservice.navigate(typeof(views.error));         }                      }              await task.completedtask; } 

ps:add using youappname.views in app.xaml.cs


Comments