NavigateTo

For NavigationBar, Fuse used NavigateTo to change pages/targets. How can I make other pages/targets invisible when targeting on one page? (without using animation, the content overlapped on the same position)

Thanks!

Hi there!

I’m not sure exactly what you want to do, but in terms of using navigation you need to use <EnteringAnimation/> and <ExitingAnimation/>in order for your pages to know how to hide themselves.

Here is a basic example with 3 pages which lets you swipe between them. Notice the animators Move the pages in this case.

<App ClearColor="#eeeeeeff" >
    <Panel>
        <Style>
            <Page>
                <EnteringAnimation>
                    <Move X="-1" RelativeTo="Size"/>
                </EnteringAnimation>
                <ExitingAnimation>
                    <Move X="1" RelativeTo="Size"/>
                </ExitingAnimation>
            </Page>
        </Style>


        <Page HitTestMode="LocalVisualAndChildren" Background="Red"/>
        <Page HitTestMode="LocalVisualAndChildren" Background="Green"/>
        <Page HitTestMode="LocalVisualAndChildren" Background="Blue"/>

        <LinearNavigation />
        <SwipeNavigate SwipeDirection="Left"/>

    </Panel>
</App>

Please let me know if you ment something else :slight_smile:

Thank you for your kind reply!

Actually I encountered a problem that the content would overlap if I didn’t use move animation. I found the solution which is changing the LinerNavigation to DirectNavigation, and added

<EnteringAnimation>
    <Change Target="targetname.Visibility" Value="Visible" />
</EnteringAnimation>
<ExitingAnimation>
    <Change Target="targetname.Visibility" Value="Hidden" />
</ExitingAnimation>

then worked!

Thanks!