{"record":{"id":"f575936810fc6894","repo":"AvaloniaUI/Avalonia","slug":"no-animator-registered-for-the-property-setter-pr","errorCode":null,"errorMessage":"No animator registered for the property {setter.Property}. Add an animator to the Animation.Animators collection that matches this property to animate it.","messagePattern":"No animator registered for the property (.+?)\\. Add an animator to the Animation\\.Animators collection that matches this property to animate it\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Avalonia.Base/Animation/Animation.cs","lineNumber":241,"sourceCode":"            var animatesVisibility = false;\n\n            foreach (var keyframe in Children)\n            {\n                foreach (var setter in keyframe.Setters)\n                {\n                    if (setter.Property is null)\n                    {\n                        throw new InvalidOperationException(\"No Setter property assigned.\");\n                    }\n\n                    if (setter.Property == Visual.IsVisibleProperty)\n                        animatesVisibility = true;\n\n                    var handler = Animation.GetAnimator(setter) ?? GetAnimatorType(setter.Property);\n\n                    if (handler == null)\n                    {\n                        throw new InvalidOperationException($\"No animator registered for the property {setter.Property}. Add an animator to the Animation.Animators collection that matches this property to animate it.\");\n                    }\n\n                    var (type, factory) = handler.Value;\n\n                    if (!handlerList.ContainsKey((type, setter.Property)))\n                        handlerList[(type, setter.Property)] = factory;\n\n                    var cue = keyframe.Cue;\n\n                    if (keyframe.TimingMode == KeyFrameTimingMode.TimeSpan)\n                    {\n                        cue = new Cue(keyframe.KeyTime.TotalSeconds / Duration.TotalSeconds);\n                    }\n\n                    var newKF = new AnimatorKeyFrame(type, factory, cue, keyframe.KeySpline);\n\n                    subscriptions.Add(newKF.BindSetter(setter, control));\n","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/AvaloniaUI/Avalonia/blob/11c542726898ae954a1ef668c65ec79ec92ab17d/src/Avalonia.Base/Animation/Animation.cs#L223-L259","documentation":"Thrown during Animation.InterpretKeyframes when no animator handler can be found for the property targeted by a Setter. Avalonia first checks Animation.Animators (GetAnimator) and then the global registry (GetAnimatorType) keyed by the property's type; if neither yields a handler, the property cannot be animated and the exception is raised.","triggerScenarios":"Animating a property whose type has no registered animator: either the property type isn't in the default animator registry, or a custom property was used without registering a matching animator. Also hit when animating a non-animatable property or one whose registered handler was removed.","commonSituations":"Animating custom AvaloniaProperty instances of types not covered by built-in animators (e.g. complex structs, custom enums); using a third-party control property that wasn't registered for animation; misconfigured Animation.Animators; animating properties that are conceptually non-numeric without a custom interpolator.","solutions":["Register a custom animator for the property type via Animation.Animators.Add(...) or the global registry before using it in an animation.","Confirm the property you are animating is one Avalonia supports out of the box (double, float, Color, Thickness, CornerRadius, Matrix, Vector, Point, Size, etc.).","If animating a custom property, provide an IAnimator implementation matching (typeof(propertyOwner), Property).","Check for typos in the Property reference; an unknown property yields no animator."],"exampleFix":"// before\n// animating MyControl.MyCustomStructProperty with no registered animator\n<Setter Property=\"MyCustomStructProperty\" Value=\"...\"/>\n\n// after — register an animator for the property type\nAnimation.Animators.AddAnimator<MyStruct>((owner, prop) => new MyStructAnimator(owner, prop));","handlingStrategy":"validation","validationCode":"// confirm an animator exists for the property before running the animation\nforeach (var kf in animation.Children)\n    foreach (var s in kf.Setters)\n        if (Animation.GetAnimator(s) is null && GetAnimatorType(s.Property) is null)\n            throw new InvalidOperationException($\"No animator for {s.Property} — register one.\");","typeGuard":"static bool AllPropertiesHaveAnimator(Animation a)\n    => a.Children.SelectMany(k => k.Setters).All(s => Animation.GetAnimator(s) is not null || GetAnimatorType(s.Property) is not null);","tryCatchPattern":null,"preventionTips":["Register custom animators for custom property types via Animation.Animators before animating.","Animate only supported types unless you provide an IAnimator.","Verify the Property reference is valid (typos yield no animator).","Keep the animator registry configured before any animation runs."],"tags":["animation","animator","registry","custom-property","avalonia-base"],"backgroundTag":null,"analyzedSha":"11c542726898ae954a1ef668c65ec79ec92ab17d","analyzedAt":"2026-08-13T11:57:40.261Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}