title: FlyoutPage on Xamarin formx 5.0
body: <p>Om Xamarin Forms we use this code to create Master Page:</p>
  <pre><code> &lt;MasterDetailPage.ToolbarItems&gt;
          &lt;ToolbarItem Priority=&quot;0&quot; Order=&quot;Secondary&quot; Text=&quot;{x:DynamicResource MasterPageControls}&quot; Command=&quot;{Binding ControlsCommand}&quot; /&gt;
          &lt;ToolbarItem Priority=&quot;1&quot; Order=&quot;Secondary&quot; Text=&quot;{x:DynamicResource Refresh}&quot; Command=&quot;{Binding RefreshCommand}&quot; /&gt;
          &lt;ToolbarItem Priority=&quot;2&quot; Order=&quot;Secondary&quot; Text=&quot;{x:DynamicResource About}&quot; Command=&quot;{Binding AboutCommand}&quot; /&gt;
          &lt;ToolbarItem Priority=&quot;4&quot; Order=&quot;Secondary&quot; Text=&quot;{x:DynamicResource Logout}&quot; Command=&quot;{Binding LogoutCommand}&quot;/&gt;
      &lt;/MasterDetailPage.ToolbarItems&gt;
      &lt;MasterDetailPage.Master&gt;
          &lt;NavigationPage Title=&quot;Title&quot; IconImageSource=&quot;hamburger.png&quot;&gt;
              &lt;x:Arguments&gt;
                  &lt;ContentPage Title=&quot;Menu&quot; 
                               BackgroundColor=&quot;White&quot;
                               NavigationPage.HasNavigationBar=&quot;False&quot;&gt;
   ....
                  &lt;/ContentPage&gt;
              &lt;/x:Arguments&gt;
          &lt;/NavigationPage&gt;
      &lt;/MasterDetailPage.Master&gt;
  </code></pre>
  <p>Now i migrate my code to version 5.0 and i change it like this (<a href="https://forums.xamarin.com/discussion/185872/changes-to-masterdetail-in-xamarin-forms-5" rel="nofollow noreferrer">from this link</a>):</p>
  <pre><code> &lt;FlyoutPage.ToolbarItems&gt;
          &lt;ToolbarItem Priority=&quot;0&quot; Order=&quot;Secondary&quot; Text=&quot;{x:DynamicResource MasterPageControls}&quot; /&gt;
          &lt;ToolbarItem Priority=&quot;1&quot; Order=&quot;Secondary&quot; Text=&quot;{x:DynamicResource Refresh}&quot; /&gt;
          &lt;ToolbarItem Priority=&quot;2&quot; Order=&quot;Secondary&quot; Text=&quot;{x:DynamicResource About}&quot; /&gt;
          &lt;ToolbarItem Priority=&quot;4&quot; Order=&quot;Secondary&quot; Text=&quot;{x:DynamicResource Logout}&quot;/&gt;
      &lt;/FlyoutPage.ToolbarItems&gt;
      &lt;FlyoutPage.Flyout&gt;
          &lt;NavigationPage Title=&quot;Title&quot; IconImageSource=&quot;hamburger.png&quot;&gt;
              &lt;x:Arguments&gt;
                  &lt;ContentPage Title=&quot;Menu&quot; 
                               BackgroundColor=&quot;White&quot;
                               NavigationPage.HasNavigationBar=&quot;False&quot;&gt;
                 ...
                  &lt;/ContentPage&gt;
              &lt;/x:Arguments&gt;
          &lt;/NavigationPage&gt;
      &lt;/FlyoutPage.Flyout&gt;
  </code></pre>
  <p>Register:</p>
  <pre><code>           containerRegistry.RegisterForNavigation&lt;NavigationPage&gt;(&quot;NavigationPage&quot;);
              containerRegistry.RegisterForNavigation&lt;PrismMasterDetailPage, PrismMasterDetailPageViewModel&gt;(&quot;MasterPage&quot;);
              containerRegistry.RegisterForNavigation&lt;MainPage, MainPageViewModel&gt;();
  </code></pre>
  <p>And navigation:</p>
  <pre><code> await NavigationService.NavigateAsync(&quot;/MasterPage/NavigationPage/MainPage&quot;);
  </code></pre>
  <p>When i try run application i got this exception:
  Flyout and Detail must be set before using a FlyoutPage</p>
  <p>What should i change in my code to work it correctly (it should show on right side MasterPage and on center of the screen MainPage) ?</p>
  <p>EDIT:
  I change my code by adding a login page. It run on App.xaml.cs likt this:</p>
  <pre><code> await NavigationService.NavigateAsync($&quot;/NavigationPage/{nameof(LoginPage)}&quot;);
  </code></pre>
  <p>On LoginPageViewModel i have binded command to button where i run a method to navigate to MainPage. In Xamarin.Forms 4.8 we use that command:</p>
  <pre><code>await NavigationService.NavigateAsync(&quot;/MasterPage/NavigationPage/MainPage&quot;,
                      new NavigationParameters {{nameof(LoginPageViewModel), string.Empty}});
  </code></pre>
  <p>But now when i use it Navigation didn't work (not have any exception or somethink like that):(</p>
  <p>When i remove /MasterPage from name i'm navigate to MainPage but i not have my MasterPage</p>
  <p>Edit 2:
  I change code form use FlyoutPage to MasterDetailPage and it start work, but MasterDetailPage is obsolete in xamarin forms 5</p>