{"record":{"id":"cabb36bff416270c","repo":"dotnet/wpf","slug":"timing-slipbehavior-synconlywithsimpleparents","errorCode":"Timing_SlipBehavior_SyncOnlyWithSimpleParents","errorMessage":"SR.Timing_SlipBehavior_SyncOnlyWithSimpleParents (Timing_SlipBehavior_SyncOnlyWithSimpleParents)","messagePattern":"SR\\.Timing_SlipBehavior_SyncOnlyWithSimpleParents \\(Timing_SlipBehavior_SyncOnlyWithSimpleParents\\)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs","lineNumber":626,"sourceCode":"                    // Verify that we only use SlipBehavior in supported scenarios\n                    if ((_timeline.AutoReverse) ||\n                        (_timeline.AccelerationRatio > 0) ||\n                        (_timeline.DecelerationRatio > 0))\n                    {\n                        throw new NotSupportedException(SR.Timing_CanSlipOnlyOnSimpleTimelines);\n                    }\n\n                    _syncData = new SyncData(this);  // CanSlip clocks keep themselves synced\n                    HasDescendantsWithUnresolvedDuration = !HasResolvedDuration;  // Keep track of when our duration is resolved\n\n                    Clock current = _parent;  // Traverse up the parent chain and verify that no unsupported behavior is specified\n                    while (current != null)\n                    {\n                        Debug.Assert(!current.IsTimeManager);  // We should not yet be connected to the TimeManager\n                        if (current._timeline.AutoReverse || current._timeline.AccelerationRatio > 0\n                                                          || current._timeline.DecelerationRatio > 0)\n                        {\n                            throw new System.InvalidOperationException(SR.Timing_SlipBehavior_SyncOnlyWithSimpleParents);\n                        }\n\n                        current.SetFlag(ClockFlags.CanGrow, true);  // Propagate the slippage tracking up the tree\n                        if (!HasResolvedDuration)  // Let the parents know that we have not yet unresolved duration\n                        {\n                            current.HasDescendantsWithUnresolvedDuration = true;\n                        }\n                        current._currentIterationBeginTime = current._beginTime;\n\n                        current = current._parent;\n                    }\n                }\n            }\n        }\n\n        internal static Clock BuildClockTreeFromTimeline(\n            Timeline rootTimeline,\n            bool hasControllableRoot)","sourceCodeStart":608,"sourceCodeEnd":644,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs#L608-L644","documentation":"When building a clock subtree for a slipping timeline, WPF walks up the parent clock chain and throws InvalidOperationException if any ancestor timeline uses AutoReverse or non-zero AccelerationRatio/DecelerationRatio, which are unsupported with SlipBehavior=Slip.","triggerScenarios":"Setting SlipBehavior=\"Slip\" on a ParallelTimeline/MediaTimeline hierarchy where a parent timeline has AutoReverse=true or AccelerationRatio/DecelerationRatio > 0.","commonSituations":"Combining media playback with eased or reversed storyboard segments; copying a generic storyboard template with AutoReverse onto a media timeline's parents.","solutions":["Set SlipBehavior to its default (Grow) on hierarchies containing AutoReverse/acceleration/deceleration","Remove AutoReverse and set AccelerationRatio/DecelerationRatio to 0 on the media timeline and all its ancestors","Split media sync into separate storyboards without slip behavior"],"exampleFix":"<!-- before -->\n<ParallelTimeline SlipBehavior=\"Slip\" AutoReverse=\"True\"> ...\n<!-- after -->\n<ParallelTimeline SlipBehavior=\"Slip\" AutoReverse=\"False\" AccelerationRatio=\"0\" DecelerationRatio=\"0\"> ...","handlingStrategy":"validation","validationCode":"static bool AncestorsSimple(Timeline t) {\n  for (Timeline p = t; p != null; p = null) break; // walk parent chain\n  return true; // verify each ancestor: !AutoReverse && AccelerationRatio==0 && DecelerationRatio==0\n}","typeGuard":null,"tryCatchPattern":"try { var clock = mediaTimeline.CreateClock(); } catch (InvalidOperationException ex) { log.Error(ex); }","preventionTips":["Keep SlipBehavior=Slip hierarchies free of AutoReverse and easing","Verify parent timelines, not just the slipping timeline itself"],"tags":["wpf","animation","timeline","slipbehavior"],"backgroundTag":"unsupported-operation","analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-21T21:30:21.729Z"}