{"record":{"id":"84cf6fbdfeb7baed","repo":"dotnet/wpf","slug":"sr-format-sr-storyboard-propertypathunresolved-path-path","errorCode":null,"errorMessage":"SR.Format(SR.Storyboard_PropertyPathUnresolved, path.Path)","messagePattern":"SR\\.Format\\(SR\\.Storyboard_PropertyPathUnresolved, path\\.Path\\)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Storyboard.cs","lineNumber":843,"sourceCode":"        //  completely ignored.\n\n        DependencyProperty targetProperty   = path.GetAccessor(0) as DependencyProperty;\n\n        // Two different ways to deal with property paths.  If the target is\n        //  on a frozen Freezable, we'll have to make a clone of the value and\n        //  attach the animation on the clone instead.\n        // For all other objects, we attach the animation clock directly on the\n        //  specified animating object and property.\n        object targetPropertyValue = targetObject.GetValue(targetProperty);\n\n        DependencyObject   animatedObject   = path.LastItem as DependencyObject;\n        DependencyProperty animatedProperty = path.LastAccessor as DependencyProperty;\n\n        if( animatedObject == null ||\n            animatedProperty == null ||\n            targetProperty == null )\n        {\n            throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathUnresolved, path.Path));\n        }\n\n        VerifyAnimationIsValid(animatedProperty, animationClock);\n\n        if( PropertyCloningRequired( targetPropertyValue ) )\n        {\n            // Verify that property paths are supported for the specified\n            //  object and property.  If the property value query (usually in\n            //  GetValueCore) doesn't call into Storyboard code, then none of this\n            //  will have any effect.  (Silently do nothing.)\n            // Throwing here is for user's sake to alert that nothing will happen.\n            VerifyComplexPathSupport( targetObject );\n\n            // We need to clone the value of the target, and from here onwards\n            //  try to pretend that it is the actual value.\n            Debug.Assert(targetPropertyValue is Freezable, \"We shouldn't be trying to clone a type we don't understand.  PropertyCloningRequired() has improperly flagged the current value as 'need to clone'.\");\n\n            // To enable animations on frozen Freezable objects, complex","sourceCodeStart":825,"sourceCodeEnd":861,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Storyboard.cs#L825-L861","documentation":"Thrown by Storyboard.ProcessComplexPath when a complex property path (e.g. '(0).(1)' with attached/complex path syntax) failed to resolve to a concrete target object and DependencyProperty. The library requires the path to end in an animatable dependency property on a non-null target; if any of animatedObject, animatedProperty, or targetProperty is null after walking the path, the path string is unresolvable and animating cannot proceed.","triggerScenarios":"Calling Storyboard.Begin/ApplyAnimationClock on a storyboard whose TargetProperty uses complex path syntax where an intermediate element is null, the final accessor is not a DependencyProperty, or the resolved targetProperty is null. Typically the PropertyPath string does not match the actual object graph.","commonSituations":"Typo'd or stale property-path strings (e.g. '(Window.ActualWidth)' misspelled), targeting a child that hasn't been loaded into the tree yet, animating a plain CLR property instead of a DependencyProperty, or XAML resource renames leaving the storyboard path pointing at a removed element.","solutions":["Verify every segment of the PropertyPath string matches real property names and that the target object exists in the visual/logical tree at Begin time.","Ensure the path's final accessor is an actual DependencyProperty (not a CLR property or MethodInfo-only path).","Delay calling Begin until the target element is loaded (e.g. handle Loaded event) so path resolution finds the object.","If the target type genuinely doesn't support complex paths, restructure the animation to target the property directly instead."],"exampleFix":"// before\nstoryboard.Begin(border, true); // path '(0).(1)' resolves to null\n// after\nif (border != null && VisualTreeHelper.GetParent(border) != null)\n{\n    storyboard.Begin(border, true); // target present in tree; path resolves\n}","handlingStrategy":"validation","validationCode":"// Resolve the target manually before Begin\nvar target = this.FindName(targetName) as FrameworkElement;\nif (target == null) throw new InvalidOperationException(\"Storyboard target not found: \" + targetName);\nvar dp = MyControl.SomeProperty; // confirm the path's final property is a DP\nif (!storyboard.Children.All(a => Storyboard.GetTargetProperty(a) != null)) throw new InvalidOperationException(\"TargetProperty unset\");","typeGuard":"bool IsAnimatableProperty(object o, PropertyPath path) => o is DependencyObject && path != null && path.Path != null;","tryCatchPattern":"try { storyboard.Begin(target, true); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"path\")) { /* log unresolved path, fall back to direct targeting */ }","preventionTips":["Delay Begin until after the target is loaded (Loaded event)","Keep property-path strings next to the elements they target and update both together","Prefer Storyboard.TargetName + simple property names over multi-segment paths","Check that animated properties are DPs registered via DependencyProperty.Register"],"tags":["wpf","animation","storyboard","property-path","invalid-operation"],"backgroundTag":"resource-not-found","analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-21T21:30:21.729Z"}