Problem with EdgeNavigator

Hi guys,

i have some problems with EdgeNavigator.

I cant use EdgeNavigator for navigate between 3 pages.

In my menu i want to create links between pages, somethng like this:

<!-- sidebar.ux -->

<StackPanel ux:Class="Sidebar">

<Button Clicked="{goToPage1}" Text="Page1" />
<Button Clicked="{goToPage2}" Text="Page2" />
<Button Clicked="{goToPage3}" Text="Page3" />

</StackPanel>

In my mainView:

<!-- MainView.ux -->

<App Theme="Basic">

<EdgeNatigator>

<!-- my menu -->
<Sidebar ux:Name="Menu"  EdgeNavigation.Edge="Left"/>

<Page /> <!--Page 1 -->
<Page /> <!--Page 2 -->
<Page /> <!--Page 3 -->

</EdgeNavigator>
</App>

Is it Possible? How can i manage my navigation flow? Any best practice?

Thanks

Hi!

Inside the main content of your EdgeNavigator, you can put a new Panel with its own navigation and then databind the active property to the active page.

Something like this:

<App Theme="Basic">

<EdgeNatigator>

<!-- my menu -->
<Sidebar ux:Name="Menu"  EdgeNavigation.Edge="Left"/>
<Panel ux:Class="MyPage">
    <ExitingAnimation>
        <Move X="1" RelativeTo="Size" Duration="0.5" />
    </ExitingAnimation>
</Panel>
<Panel><!-- adding a panel here to contain the pages -->
    <DirectNavigation Active="{activePage}" /> <!-- notice the binding -->
    <MyPage /> <!--Page 1 -->
    <MyPage /> <!--Page 2 -->
    <MyPage /> <!--Page 3 -->
</Panel>
</EdgeNavigator>
</App>

hi,

yes i did that, but i thought that was a bad practice. Seems it’s not!

Thanks :slight_smile: