Animation of navigation
By applying Storyboard, animation can be added during navigation.
<Window ...>
<Window.Resources>
<Storyboard x:Key="EntryStoryboard">
<DoubleAnimation
Storyboard.TargetName="MainFrame"
Storyboard.TargetProperty="(kamishibai:NavigationFrame.Opacity)"
From="0" To="1" Duration="0:0:0.1"/>
</Storyboard>
</Window.Resources>
<Grid>
<kamishibai:NavigationFrame x:Name="MainFrame"
EntryForwardStoryboard="{StaticResource EntryStoryboard}"
EntryBackwardStoryboard="{StaticResource EntryStoryboard}"/>
</Grid>
</Window>
Storyboard can be set for four different timings.
プロパティ | 説明 |
---|---|
ExitForwardStoryboard | Apply Storyboard to the source page when navigating forward. |
EntryForwardStoryboard | Apply Storyboard to the destination page when navigating forward. |
ExitBackwardStoryboard | Apply Storyboard to the source page when go back. |
EntryBackwardStoryboard | Apply Storyboard to the destination page when go back. |
For example, forward navigation are executed in the following order
- ExitForwardStoryboard
- Navigation
- EntryForwardStoryboard
Since these are processed synchronously, the entrance animation can be connected after the exit animation.
Navigation events are executed during the animation. The details are as follows
- Begin ExitForwardStoryboard
- IPausingAsyncAware#OnPausingAsync
- IPausingAware#OnPausing
- INavigationFramework#Pausing
- INavigatingAsyncAware#OnNavigatingAsync
- INavigatingAware#OnNavigating
- INavigationFramework#Navigating
- Wait ExitForwardStoryboard
- Navigation
- Begin EntryForwardStoryboard
- INavigatedAsyncAware#OnNavigatedAsync
- INavigatedAware#OnNavigated
- INavigationFramework#Navigated
- IPausedAsyncAware#OnPausedAsync
- IPausedAware#OnPaused
- INavigationFramework#Paused
- Wait EntryForwardStoryboard
« Save File Dialog | Menu |