{"record":{"id":"fa3a8e105af4b4f5","repo":"AvaloniaUI/Avalonia","slug":"animator-has-no-property-specified-fa3a8e","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/GradientBrushAnimator.cs","lineNumber":73,"sourceCode":"                    return new ImmutableLinearGradientBrush(\n                        InterpolateStops(progress, oldValue.GradientStops, newValue.GradientStops),\n                        s_doubleAnimator.Interpolate(progress, oldValue.Opacity, newValue.Opacity),\n                        InterpolateTransform(progress, oldValue.Transform, newValue.Transform),\n                        s_relativePointAnimator.Interpolate(progress, oldValue.TransformOrigin, newValue.TransformOrigin),\n                        oldValue.SpreadMethod,\n                        s_relativePointAnimator.Interpolate(progress, oldLinear.StartPoint, newLinear.StartPoint),\n                        s_relativePointAnimator.Interpolate(progress, oldLinear.EndPoint, newLinear.EndPoint));\n\n                default:\n                    return progress >= 0.5 ? newValue : oldValue;\n            }\n        }\n\n        public override IDisposable BindAnimation(Animatable control, IObservable<IGradientBrush?> instance)\n        {\n            if (Property is null)\n            {\n                throw new InvalidOperationException(\"Animator has no property specified.\");\n            }\n\n            return control.Bind((AvaloniaProperty<IBrush?>)Property, instance, BindingPriority.Animation);\n        }\n\n        private static ImmutableTransform? InterpolateTransform(double progress,\n            ITransform? oldTransform, ITransform? newTransform)\n        {\n            if (oldTransform is TransformOperations oldTransformOperations\n                && newTransform is TransformOperations newTransformOperations)\n            {\n\n                return new ImmutableTransform(TransformOperations\n                    .Interpolate(oldTransformOperations, newTransformOperations, progress).Value);\n            }\n\n            if (oldTransform is not null)\n            {","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/AvaloniaUI/Avalonia/blob/11c542726898ae954a1ef668c65ec79ec92ab17d/src/Avalonia.Base/Animation/Animators/GradientBrushAnimator.cs#L55-L91","documentation":"Thrown by GradientBrushAnimator.BindAnimation when Property is null. The gradient animator overrides BindAnimation to bind an IGradientBrush observable to the target control's property, and needs a non-null AvaloniaProperty to do so.","triggerScenarios":"Calling Animation.Play on a GradientBrushAnimator whose Property has not been set.","commonSituations":"Animating a gradient property without declaring the target AvaloniaProperty; XAML Animator missing the Property attribute for a gradient brush animation.","solutions":["Set the GradientBrushAnimator.Property to the brush-typed target property before playing.","Confirm the target property accepts IBrush (e.g. Border.BackgroundProperty).","Use the correct specialized Animator for the brush kind (SolidColorBrushAnimator vs GradientBrushAnimator)."],"exampleFix":"// before\nvar animator = new GradientBrushAnimator();\n\n// after\nvar animator = new GradientBrushAnimator { Property = Border.BackgroundProperty };","handlingStrategy":"type-guard","validationCode":"if (animator.Property is null)\n    throw new InvalidOperationException(\"GradientBrushAnimator.Property must be set.\");","typeGuard":"static bool HasProperty(GradientBrushAnimator a) => a.Property is not null;","tryCatchPattern":null,"preventionTips":["Set the brush-typed target property when creating a GradientBrushAnimator.","Pick the correct Animator subclass for the brush kind.","Verify Property is non-null before Play."],"tags":["animation","configuration","nullable-property","brush","avalonia"],"backgroundTag":null,"analyzedSha":"11c542726898ae954a1ef668c65ec79ec92ab17d","analyzedAt":"2026-08-13T11:57:40.261Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}