Storyboard.TargetName is indeed not allowed inside Style.Trigger storyboard. However, the markup here is in a ControlTemplate.Trigger storyboard, which does allow targeting of named elements as long as the elements are within the ControlTemplate.
To diagnose further, we would need to see the rest of the ControlTemplate. Specifically, we need to see how the rectangles "rect_Normal" and "rect_Over" are defined, and their relationship to the rest of the control template.
It would also help to know what "doesn't work" means. If an exception is thrown, the exception message and call stack should provide useful information.
(From Microsoft Legal: This posting is provided "AS IS" with no warranties, and confers no rights.) |