{"record":{"id":"9890b1e4a0169b96","repo":"AvaloniaUI/Avalonia","slug":"animator-has-no-property-specified-9890b1","errorCode":null,"errorMessage":"Animator has no property specified.","messagePattern":"Animator has no property specified\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Avalonia.Base/Animation/Animators/Animator`1.cs","lineNumber":98,"sourceCode":"                return (\n                    KeyFrameInfo.FromKeyFrame(this[Count - 2], neutralValue),\n                    KeyFrameInfo.FromKeyFrame(lastFrame, neutralValue));\n            }\n\n            // Past the last frame which isn't at time 1.0: interpolate between the last frame and 1.0.\n            var afterValue = lastFrame.FillAfter ? GetTypedValue(lastFrame.Value, neutralValue) : neutralValue;\n            return (\n                KeyFrameInfo.FromKeyFrame(lastFrame, neutralValue),\n                new KeyFrameInfo(1.0, afterValue, lastFrame.KeySpline));\n        }\n\n        private static T GetTypedValue(object? untypedValue, T neutralValue)\n            => untypedValue is T value ? value : neutralValue;\n\n        public virtual IDisposable BindAnimation(Animatable control, IObservable<T> instance)\n        {\n            if (Property is null)\n                throw new InvalidOperationException(\"Animator has no property specified.\");\n\n            return control.Bind((AvaloniaProperty<T>)Property, instance, BindingPriority.Animation);\n        }\n\n        /// <summary>\n        /// Runs the KeyFrames Animation.\n        /// </summary>\n        internal IDisposable Run(Animation animation, Animatable control, IClock? clock, Action? onComplete, bool shouldPauseOnInvisible)\n        {\n            var instance = new AnimationInstance<T>(\n                animation,\n                control,\n                this,\n                clock ?? control.Clock ?? Clock.GlobalClock,\n                onComplete,\n                InterpolationHandler,\n                shouldPauseOnInvisible);\n","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/AvaloniaUI/Avalonia/blob/11c542726898ae954a1ef668c65ec79ec92ab17d/src/Avalonia.Base/Animation/Animators/Animator`1.cs#L80-L116","documentation":"Thrown by Animator<T>.BindAnimation when the Animator's Property is null. BindAnimation binds the animation observable to the target control's property, so it requires a concrete AvaloniaProperty to bind against.","triggerScenarios":"Calling Animation.Play (which calls Animator.Run -> BindAnimation) on an Animator that has no Property set.","commonSituations":"Programmatically building an Animator and forgetting Property; XAML Animator element missing the Property attribute.","solutions":["Set Animator.Property to the target AvaloniaProperty before Play/Apply.","Construct the Animator via the XAML/animation builder that requires Property.","Verify the Animator wiring in code-behind at definition time."],"exampleFix":"// before\nanimator.Property = null;\nanimation.Play(control);\n\n// after\nanimator.Property = Visual.OpacityProperty;\nanimation.Play(control);","handlingStrategy":"type-guard","validationCode":"if (animator.Property is null)\n    throw new InvalidOperationException(\"Animator.Property must be set before Play/Apply.\");","typeGuard":"static bool HasProperty(Animator a) => a.Property is not null;","tryCatchPattern":null,"preventionTips":["Require a Property argument in any Animator construction helper.","Assert Property is set immediately before calling Animation.Play.","Audit XAML Animator elements for a missing Property= attribute."],"tags":["animation","configuration","nullable-property","avalonia"],"backgroundTag":null,"analyzedSha":"11c542726898ae954a1ef668c65ec79ec92ab17d","analyzedAt":"2026-08-13T11:57:40.261Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}