{"record":{"id":"c2b41ba45fbb61db","repo":"dotnet/wpf","slug":"timing-cansliponlyonsimpletimelines","errorCode":"Timing_CanSlipOnlyOnSimpleTimelines","errorMessage":"SR.Timing_CanSlipOnlyOnSimpleTimelines (Timing_CanSlipOnlyOnSimpleTimelines)","messagePattern":"SR\\.Timing_CanSlipOnlyOnSimpleTimelines \\(Timing_CanSlipOnlyOnSimpleTimelines\\)","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs","lineNumber":613,"sourceCode":"            bool hasControllableRoot)\n        {\n            SetFlag(ClockFlags.CanSlip, GetCanSlip());  // Set the CanSlip flag\n\n            // Here we preview the clock's own slip-ability, hence ClockGroups should return false\n            // at this stage, because their children are not yet added by the time of this call.\n            if (CanSlip && (IsRoot || _timeline.BeginTime.HasValue))\n            {\n                ResolveDuration();\n\n                // A sync clock with duration of zero or no begin time has no effect, so do skip it\n                if (!_resolvedDuration.HasTimeSpan || _resolvedDuration.TimeSpan > TimeSpan.Zero)\n                {\n                    // 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                        {","sourceCodeStart":595,"sourceCodeEnd":631,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs#L595-L631","documentation":"A timeline with CanSlip (e.g. MediaTimeline) using SlipBehavior=Slip only supports 'simple' timing. BuildClockSubTreeFromTimeline throws NotSupportedException when the slipping timeline itself has AutoReverse=true or AccelerationRatio/DecelerationRatio > 0.","triggerScenarios":"Creating a clock tree from a MediaTimeline (or other CanSlip timeline) with SlipBehavior=Slip while that timeline has AutoReverse=true or AccelerationRatio/DecelerationRatio > 0.","commonSituations":"Adding easing/acceleration to media-synced animations; setting AutoReverse on a MediaTimeline expecting rewind behavior.","solutions":["Remove AutoReverse or reset AccelerationRatio/DecelerationRatio to 0 on the slipping timeline","Use default SlipBehavior (Grow) if advanced timing effects are needed","Simulate reverse playback via Seek instead of AutoReverse on media timelines"],"exampleFix":"// before\nvar media = new MediaTimeline { Source = uri, SlipBehavior = SlipBehavior.Slip, AutoReverse = true }; // throws\n// after\nvar media = new MediaTimeline { Source = uri, SlipBehavior = SlipBehavior.Slip };","handlingStrategy":"validation","validationCode":"bool slipSafe = !media.AutoReverse && media.AccelerationRatio == 0 && media.DecelerationRatio == 0;\nif (!slipSafe) media.SlipBehavior = SlipBehavior.Grow;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Audit SlipBehavior=Slip timelines for AutoReverse/easing","Use Grow behavior when advanced timing is needed"],"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-22T01:17:13.364Z"}