开发者

No applicable name scope exists WPF error

I created simple rectangle ->make into control and then added it to new resourcedictionary . I am getting error when i am trying to animate it. "No applicable name scope exists to resolve the name 'rectangle' error" .

How can I fixed this from xaml ?(i know that is sometihing wrong with namescopes but i want to fix it in xaml) tanks for hel开发者_运维技巧p


You cannot fix it in XAML if the control was created in code. You register the control in a NameScope.

MSDN

If the name is not registered, the added object cannot be referenced by name through methods such as FindName, and you cannot use that name for animation targeting.

See also the Storyboards Overview there is an example of how to deal with dynamically added controls.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜