Disabling EdgeNavigator for certain page

I want to disable Sidebar page on LoginPage.ux becasue at that state I don’t need it. However, I need the Sidebar page on DashboardPage.ux. I did try with whiletrue but keeps throwing me an error.
This is my MainView.ux page

<EdgeNavigator ux:Name="EdgeNav" HitTestMode="LocalBoundsAndChildren" Opacity="1">
<Sidebar EdgeNavigation.Edge="Left" >

</Sidebar>

   <Navigator DefaultPath="LoginPage">
<LoginPage ux:Template="LoginPage" router="router" />
<DashboardPage ux:Template="DashboardPage" router="router" />
   </Navigator>
  </EdgeNavigator>

The approach to solving this usually is simply putting the pages that don’t need a sidebar in a parent that does not have one. The structure then is something like this:

<Navigator DefaultPath="pagesWithEdge">
    <PagesWithEdge ux:Template="pagesWithEdge" />
    <PagesWithoutEdge ux:Template="pagesWithoutEdge" />
</Navigator>

<Panel ux:Class="PagesWithEdge">
    <EdgeNavigator>
        <Sidebar />
        <Navigator DefaultPath="somePage">
            <SomePage ux:Template="somePage" />
        </Navigator>
    </EdgeNavigator>
</Panel>

<!-- ... -->

This does add another level of depth to your navigation calls, but that’s about the only inconvenience:

router.push("pagesWithEdge", {}, "somePage", {});

Hope this helps!

I hope this answer isn’t too late.

If you want to disable Sidebar page on Somepage, then insert this code in Somepage.

<WhielActive>
    <Change EdgeNavigator.IsEnabled="false" />
</WhileActive>