Use a Clip rect for Pane animations instead of the Width/Height #10339

Open
opened 2026-01-31 02:18:56 +00:00 by claunia · 0 comments
Owner

Originally created by @zadjii-msft on GitHub (Aug 27, 2020).

follow up from #7364

Looking at this doc:

An animation is independent if it has any of these characteristics:

  • The Duration of the animation is 0 seconds (see Warning)
  • The animation targets UIElement.Opacity
  • The animation targets a sub-property value of these UIElement properties: Transform3D, RenderTransform, Projection, Clip
  • The animation targets Canvas.Left or Canvas.Top
  • The animation targets a Brush value and uses a SolidColorBrush, animating its Color
  • The animation is an ObjectAnimationUsingKeyFrames

emph added

Right now we're stuck being a dependent animation, because we're animating the Width or Height. But we might be able to use Clip to achieve the same effect.

I'm no XAML wizard, so that'll require another day of learning to figure out, but I figured I'd write these notes down before I forgot.

Might even be able to get us #7365 for free.

Originally created by @zadjii-msft on GitHub (Aug 27, 2020). _follow up from #7364_ Looking at [this doc](https://docs.microsoft.com/en-us/windows/uwp/design/motion/storyboarded-animations#dependent-and-independent-animations): > An animation is independent if it has any of these characteristics: > > * The Duration of the animation is 0 seconds (see Warning) > * The animation targets UIElement.Opacity > * The animation targets a sub-property value of these UIElement properties: Transform3D, RenderTransform, Projection, **Clip** > * The animation targets Canvas.Left or Canvas.Top > * The animation targets a Brush value and uses a SolidColorBrush, animating its Color > * The animation is an ObjectAnimationUsingKeyFrames > _emph added_ Right now we're stuck being a dependent animation, because we're animating the `Width` or `Height`. But we might be able to use `Clip` to achieve the same effect. I'm no XAML wizard, so that'll require another day of learning to figure out, but I figured I'd write these notes down before I forgot. Might even be able to get us #7365 for free.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10339