You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Microsoft.Toolkit.Uwp.UI.Animations/Xaml/ImplicitAnimationSet.cs
+24-4Lines changed: 24 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,29 @@
14
14
namespaceMicrosoft.Toolkit.Uwp.UI.Animations
15
15
{
16
16
/// <summary>
17
-
/// A collection of implicit animations that can be grouped together. This type represents a composite animation
18
-
/// (such as <see cref="Windows.UI.Xaml.Media.Animation.Storyboard"/>) that is executed on a given element.
17
+
/// A collection of implicit animations that can be assigned to a <see cref="UIElement"/> and configured to be run automatically
18
+
/// when the element is either shown or hidden (through <see cref="Implicit.ShowAnimationsProperty"/> and <see cref="Implicit.HideAnimationsProperty"/>,
19
+
/// or whenever one of the targeted properties on the underlying <see cref="Visual"/> element changes, through <see cref="Implicit.AnimationsProperty"/>.
20
+
/// <para>
21
+
/// Animations within an <see cref="ImplicitAnimationSet"/> should be objects implementing the <see cref="IImplicitTimeline"/> interface, such as
/// <see cref="OffsetAnimation"/> and <see cref="ScaleAnimation"/>, or custom ones such as <see cref="ScalarAnimation"/> and <see cref="Vector3Animation"/>).
24
+
/// Adding incompatible elements cannot be validated at build-time, but will result in a runtime crash.
25
+
/// </para>
26
+
/// <para>
27
+
/// Animations will monitor for changes in real-time to any of their public properties. For instance, if a binding is used to dynamically update the
28
+
/// <see cref="Animation{TValue, TKeyFrame}.To"/> to <see cref="Animation{TValue, TKeyFrame}.From"/> properties, the entire animation set will be
29
+
/// initialized again and assigned to the underlyign <see cref="Visual"/> object for the targeted <see cref="UIElement"/>. This does not currently apply
30
+
/// to changes to the <see cref="Animation{TValue, TKeyFrame}.KeyFrames"/> property though (other than the entire property being reassigned). To achieve
31
+
/// dynamic updates to animation sets in that case, either leverage expression keyframes or just use code-behind to manually reinitialize the animations.
32
+
/// </para>
19
33
/// </summary>
34
+
/// <remarks>
35
+
/// An <see cref="ImplicitAnimationSet"/> instance can only be used on a single target <see cref="UIElement"/>, and it cannot be shared across multiple
36
+
/// elements. Attempting to do so will result in a runtime crash. Furthermore, it is recommended not to move <see cref="IImplicitTimeline"/> instances from
37
+
/// one <see cref="ImplicitAnimationSet"/> to another, and doing so might add unnecessary runtime overhead over time. If you want to apply the same animations
38
+
/// to multiple elements, simply create another <see cref="ImplicitAnimationSet"/> instance and another set of animations with the same properties within it.
0 commit comments