storyboard Target
the element in DataTemplate(maybe the same in ControlTemplate) use storyboard in rootElement.Resources whose Target is outside DataTemlate,this will cause an error that said cannot find … in the name scope of …
Solution:move the storyboard in rootElement.Resources to Grid(the container of DataTemplate).Resource.
but I don’t know why it works.