{"record":{"id":"b4a005290a4e0d7d","repo":"dotnet/wpf","slug":"timing-slipbehavior-sliponlyonsimpletimelines","errorCode":"Timing_SlipBehavior_SlipOnlyOnSimpleTimelines","errorMessage":"SR.Timing_SlipBehavior_SlipOnlyOnSimpleTimelines (Timing_SlipBehavior_SlipOnlyOnSimpleTimelines)","messagePattern":"SR\\.Timing_SlipBehavior_SlipOnlyOnSimpleTimelines \\(Timing_SlipBehavior_SlipOnlyOnSimpleTimelines\\)","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs","lineNumber":127,"sourceCode":"                    childClock = AllocateClock(timelineChildren[index], hasControllableRoot);\n                    childClock._parent = this;  // We connect the child to the subtree before calling BuildClockSubtreeFromTimeline\n                    childClock.BuildClockSubTreeFromTimeline(timelineChildren[index], hasControllableRoot);\n                    _children.Add(childClock);\n                    childClock._childIndex = index;\n                }\n\n                // If we have SlipBehavior, check if we have any childen with which to slip.\n                if (_timeline is ParallelTimeline &&\n                    ((ParallelTimeline)_timeline).SlipBehavior == SlipBehavior.Slip)\n                {\n                    // Verify that we only use SlipBehavior in supported scenarios\n                    if (!IsRoot ||\n                       (_timeline.RepeatBehavior.HasDuration) ||\n                       (_timeline.AutoReverse) ||\n                       (_timeline.AccelerationRatio > 0) ||\n                       (_timeline.DecelerationRatio > 0))\n                    {\n                        throw new NotSupportedException(SR.Timing_SlipBehavior_SlipOnlyOnSimpleTimelines);\n                    }\n\n                    for (int index = 0; index < _children.Count; index++)\n                    {\n                        Clock child = _children[index];\n                        if (child.CanSlip)\n                        {\n                            Duration duration = child.ResolvedDuration;\n\n                            // A sync clock with duration of zero or no begin time has no effect, so do skip it\n                            if ((!duration.HasTimeSpan || duration.TimeSpan > TimeSpan.Zero)\n                                && child._timeline.BeginTime.HasValue)\n                            {\n                                _syncData = new SyncData(child);\n                                child._syncData = null;  // The child will no longer self-sync\n                            }\n\n                            break;  // We only want the first child with CanSlip","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs#L109-L145","documentation":"SlipBehavior.Slip is only supported on root clock trees with simple timelines: the root may not have a RepeatBehavior with a Duration, AutoReverse, or non-zero Acceleration/Deceleration ratios, otherwise child slipping cannot be tracked. BuildClockSubTreeFromTimeline throws NotSupportedException (Timing_SlipBehavior_SlipOnlyOnSimpleTimelines) when those conditions are violated.","triggerScenarios":"Creating a Clock/Storyboard with SlipBehavior=\"Slip\" on a timeline that also sets RepeatBehavior with Duration, AutoReverse=\"True\", AccelerationRatio>0, or DecelerationRatio>0 (on the root).","commonSituations":"Combining video MediaTimeline slipping with eased/fancied-up root timelines; applying global storyboard easing or looping (RepeatBehavior=\"2x\"/AutoReverse) to a storyboard that contains a media child with slip.","solutions":["Set SlipBehavior=\"Grow\" (default) instead of Slip","Remove AutoReverse, AccelerationRatio/DecelerationRatio, and duration-based RepeatBehavior from the root timeline","Apply easing/acceleration to individual child animations instead of the slipping root","Move the slipping media child into a simpler nested timeline structure"],"exampleFix":"// before\n<Storyboard SlipBehavior=\"Slip\" AutoReverse=\"True\">\n  <MediaTimeline Source=\"clip.wmv\" />\n</Storyboard> // throws\n// after\n<Storyboard SlipBehavior=\"Slip\">\n  <MediaTimeline Source=\"clip.wmv\" />\n</Storyboard>","handlingStrategy":"validation","validationCode":"bool slipAllowed = timeline.SlipBehavior != SlipBehavior.Slip\n    || !timeline.RepeatBehavior.HasDuration\n    && !timeline.AutoReverse\n    && timeline.AccelerationRatio == 0\n    && timeline.DecelerationRatio == 0;\nif (!slipAllowed) timeline.SlipBehavior = SlipBehavior.Grow;","typeGuard":null,"tryCatchPattern":"try { storyboard.Begin(this, true); }\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"Slip\")) { /* switch SlipBehavior to Grow and retry */ }","preventionTips":["Keep slipping root timelines simple: no AutoReverse, easing ratios, or duration RepeatBehavior","Apply easing/acceleration on child animations, not slipping roots","Default to SlipBehavior.Grow unless media-sync slipping is explicitly required"],"tags":["wpf","animation","storyboard","slip-behavior","not-supported"],"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"}