How to use ux:AutoBind="false"

Hi I’d like to use ux:AutoBind=“false” in my HierarchicalNavigation to hide some pages when navigating between main pages (because when you go from A to F – B,C,D,E are flyed over).

I fount about ux:AutoBind=“false”, but when I navigate to a Page with this parameter, my docked panels disapear. When I go back to the root page, they don’t show back

Here is how my code looks like.

<App Theme="Basic">
    <DockPanel>
        <HierarchicalNavigation ux:Name="MainAppNav" Active="Places" />
        <Panel Dock="Top" Height="30" Color="#000" />
        <Page ux:Class="MyPage" Background="#fff">
          <EnteringAnimation>
              <Move X="-1" RelativeTo="ParentSize" Duration="1"/>
          </EnteringAnimation>
          <ExitingAnimation>
              <Move X="1" RelativeTo="ParentSize" Duration="1"/>
          </ExitingAnimation>
        </Page>

        <MyPage Background="Red" Name="Places">
            <Button Height="50">
              <Clicked>
                <NavigateTo Target="PlacesChild"/>
              </Clicked>
            </Button>
        </MyPage>

        <MyPage Background="Blue" Name="PlacesChild" ux:AutoBind="false">
          <Button Height="50">
            <Clicked>
              <GoBack/>
            </Clicked>
          </Button>
        </MyPage>
    </DockPanel>
</App>

What am’I doing wrong ?

I took the liberty of updating your code to latest best practices. The <Style> tag is deprecated, use ux:Class instead.

Hi,

HeirarchicalNavigation navigates among the cildren of the panel. In your setup you will “navigate away” from your top bar.

What you probably want is this structure:

<DockPanel>
    <Panel Dock="Top" Height="30" Color="#000" />

    <Panel>
        <HeirarchicalNavigation .. />
        <MyPage ... />
        <MyPage ux:AutoBind="false" ... />
    </Panel>

Thanks, it works now :slight_smile: