UWP page transitions applied to frame for all pages
I currently have a UWP page that acts as my main window and defines a generic menu / title wrapper that is about everything else.
Then I have <frame/>
<Frame Name="ContentFrame" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="1"/>
I have about 10 pages that I have Navigate()
to use the content frame, but I would like to add UWP page transitions but shouldn't be forced to add a transition to every page (it seems like a mess and I don't want to forget when I add new pages) ...
Is there a way to define a transition within a frame so that all child pages navigate?
I tried this but no luck
<Frame Name="ContentFrame" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="1">
<TransitionCollection>
<NavigationThemeTransition>
<NavigationThemeTransition.DefaultNavigationTransitionInfo>
<SlideNavigationTransitionInfo/>
</NavigationThemeTransition.DefaultNavigationTransitionInfo>
</NavigationThemeTransition>
</TransitionCollection>
</Frame>
source to share
I accidentally discovered the answer (intelisence):
I was missing tags Frame.ContentTransitions
for the animation to be applied to child pages.
<Frame Name="ContentFrame" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="1">
<Frame.ContentTransitions>
<TransitionCollection>
<NavigationThemeTransition>
<NavigationThemeTransition.DefaultNavigationTransitionInfo>
<SlideNavigationTransitionInfo/>
</NavigationThemeTransition.DefaultNavigationTransitionInfo>
</NavigationThemeTransition>
</TransitionCollection>
</Frame.ContentTransitions>
</Frame>
source to share