WPF Window ScaleTransform animation
I have a Window in WPF that I want to display with ShowDialog and when the
window is displayed it should have a scaling animation. I have
successfully created the animation and all works great except one thing:
When the window approaches it's fully scaled state and the easing function
kicks in, the outer edges of the window seems to go beyond the actual
window bounds and get clipped. How can I use this scaling animation with
easing and not have it clipped?
This is the scaling animation I'm using:
<DoubleAnimation
Storyboard.TargetProperty="(Window.RenderTransform).(ScaleTransform.ScaleX)"
BeginTime="0:0:0.0" Duration="0:0:0.4" From="0" To="1">
<DoubleAnimation.EasingFunction>
<BackEase EasingMode="EaseOut" Amplitude="0.25" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
<DoubleAnimation
Storyboard.TargetProperty="(Window.RenderTransform).(ScaleTransform.ScaleY)"
BeginTime="0:0:0.0" Duration="0:0:0.4" From="0" To="1">
<DoubleAnimation.EasingFunction>
<BackEase EasingMode="EaseOut" Amplitude="0.25" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
No comments:
Post a Comment