{"record":{"id":"2b6d662334781d8d","repo":"HandyOrg/HandyControl","slug":"animation-notextchildren","errorCode":null,"errorMessage":"Animation_NoTextChildren","messagePattern":"Animation_NoTextChildren","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Shared/HandyControl_Shared/Media/Animation/GeometryAnimationUsingKeyFrames.cs","lineNumber":166,"sourceCode":"        }\n        else\n        {\n            throw new ArgumentException(\"Animation_ChildMustBeKeyFrame\", nameof(child));\n        }\n    }\n\n    void IAddChild.AddText(string childText)\n    {\n        if (childText == null)\n        {\n            throw new ArgumentNullException(nameof(childText));\n        }\n\n        AddText(childText);\n    }\n\n    [EditorBrowsable(EditorBrowsableState.Advanced)]\n    protected virtual void AddText(string childText) => throw new InvalidOperationException(\"Animation_NoTextChildren\");\n\n    protected override Geometry GetCurrentValueCore(Geometry defaultOriginValue, Geometry defaultDestinationValue, AnimationClock animationClock)\n    {\n        if (_keyFrames == null)\n        {\n            return defaultDestinationValue;\n        }\n\n        if (!_areKeyTimesValid)\n        {\n            ResolveKeyTimes();\n        }\n\n        if (_sortedResolvedKeyFrames == null)\n        {\n            return defaultDestinationValue;\n        }\n","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/HandyOrg/HandyControl/blob/2c0875ebd67326e0c67282967e3e809c69282fee/src/Shared/HandyControl_Shared/Media/Animation/GeometryAnimationUsingKeyFrames.cs#L148-L184","documentation":"GeometryAnimationUsingKeyFrames.AddText throws InvalidOperationException(\"Animation_NoTextChildren\") because a key-frame geometry animation cannot be built from raw text content. XAML content between its tags must be GeometryKeyFrame elements; any literal text (including stray whitespace-formatted text nodes) reaches AddText and is rejected.","triggerScenarios":"Putting literal text or an unrecognized string inside <GeometryAnimationUsingKeyFrames>...</GeometryAnimationUsingKeyFrames> in XAML, causing IAddChild.AddText to be invoked.","commonSituations":"Typing a comment or stray characters inside the animation element; using inner text from a template meant for GeometryAnimation; malformed XAML where a child collapsed into text.","solutions":["Remove all text content from the GeometryAnimationUsingKeyFrames element in XAML; only GeometryKeyFrame child elements are allowed.","Replace inline text with proper <GeometryKeyFrame Value=\"...\" /> elements.","Validate the XAML compiles and inspect the element for stray characters between tags."],"exampleFix":"// before\n<GeometryAnimationUsingKeyFrames>\n    M0,0 L100,100 <!-- invalid text child -->\n</GeometryAnimationUsingKeyFrames>\n// after\n<GeometryAnimationUsingKeyFrames>\n    <GeometryKeyFrame Value=\"M0,0 L100,100\" KeyTime=\"0:0:1\" />\n</GeometryAnimationUsingKeyFrames>","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { animation.AddText(text); } catch (InvalidOperationException ex) when (ex.Message == \"Animation_NoTextChildren\") { // text is not a valid child; convert to GeometryKeyFrame or discard\n}","preventionTips":["Never put literal text inside <GeometryAnimationUsingKeyFrames> in XAML.","Inspect the element for stray characters or comments that collapse into text nodes.","Express geometry values via GeometryKeyFrame.Value attributes, not element text."],"tags":["animation","xaml","content-model","invalid-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"2c0875ebd67326e0c67282967e3e809c69282fee","analyzedAt":"2026-09-14T14:45:29.754Z","contentChangedAt":"2026-09-14T14:45:29.754Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}