Reputation: 21
So I am using the fall creators update NavigationView
UI Element.
When this element has navView.DisplayMode = NavigationViewDisplayMode.Compact
there is a brief animation of the pane expanding/contracting when you press the hamburger button.
I want to disable this animation so the pane open/closes instantaneously. Is there a way to do this?
Upvotes: 2
Views: 1011
Reputation: 319
NavigationView use SplitView, and animation is implemented by SplitView.
Copy <Style TargetType="SplitView">
to your app.xaml or page, then replace all
KeyTime="0:0:a.b" to KeyTime="0:0:0"
<VisualStateGroup.Transitions>
<VisualTransition From="Closed" To="OpenOverlayLeft">
<Storyboard>
...
<SplineDoubleKeyFrame KeyTime="0:0:0.35" KeySpline="0.1,0.9 0.2,1.0" Value="0" />
</DoubleAnimationUsingKeyFrames>
Like KeyTime="0:0:0.35" above, change it to "0:0:0.00"
<SplineDoubleKeyFrame KeyTime="0:0:0.00" KeySpline="0.1,0.9 0.2,1.0" Value="0" />
Upvotes: 1