HandyOrg/HandyControl · error · InvalidOperationException
Animation_NoTextChildren
Error message
Animation_NoTextChildren
What it means
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.
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.
Example fix
// before
<GeometryAnimationUsingKeyFrames>
M0,0 L100,100 <!-- invalid text child -->
</GeometryAnimationUsingKeyFrames>
// after
<GeometryAnimationUsingKeyFrames>
<GeometryKeyFrame Value="M0,0 L100,100" KeyTime="0:0:1" />
</GeometryAnimationUsingKeyFrames> Defensive patterns
Strategy: try-catch
Try / catch
try { animation.AddText(text); } catch (InvalidOperationException ex) when (ex.Message == "Animation_NoTextChildren") { // text is not a valid child; convert to GeometryKeyFrame or discard
} Prevention
- 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.
When it happens
Trigger: Putting literal text or an unrecognized string inside <GeometryAnimationUsingKeyFrames>...</GeometryAnimationUsingKeyFrames> in XAML, causing IAddChild.AddText to be invoked.
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Animation_ChildMustBeKeyFrame
- CannotConvertType
- The dialog is not a derived class of the FrameworkElement.
- Calls to BeginInit cannot be nested.
- The JumpList can't be applied until EndInit has been called.
AI-assisted analysis of HandyOrg/HandyControl@2c0875ebd6 (2026-09-14).
Data as JSON: /api/errors/2b6d662334781d8d.
Report an issue: GitHub.
Appendix: source
Thrown at src/Shared/HandyControl_Shared/Media/Animation/GeometryAnimationUsingKeyFrames.cs:166
}
else
{
throw new ArgumentException("Animation_ChildMustBeKeyFrame", nameof(child));
}
}
void IAddChild.AddText(string childText)
{
if (childText == null)
{
throw new ArgumentNullException(nameof(childText));
}
AddText(childText);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void AddText(string childText) => throw new InvalidOperationException("Animation_NoTextChildren");
protected override Geometry GetCurrentValueCore(Geometry defaultOriginValue, Geometry defaultDestinationValue, AnimationClock animationClock)
{
if (_keyFrames == null)
{
return defaultDestinationValue;
}
if (!_areKeyTimesValid)
{
ResolveKeyTimes();
}
if (_sortedResolvedKeyFrames == null)
{
return defaultDestinationValue;
}
View on GitHub (pinned to 2c0875ebd6)