public void StoryboardTargetTest() { XamlNamespaces namespaces = new XamlNamespaces("http://schemas.microsoft.com/winfx/2006/xaml/presentation"); ColorAnimation colorAnimation = new ColorAnimation { From = Colors.Green, To = Colors.Blue }; Storyboard.SetTargetProperty(colorAnimation, PropertyPath.Parse("(Control.Background).(SolidColorBrush.Color)", namespaces)); Storyboard storyboard = new Storyboard(); storyboard.Children.Add(colorAnimation); TestRootClock rootClock = new TestRootClock(); Control control = new Control(); control.SetAnimatableRootClock(new AnimatableRootClock(rootClock, true)); control.Background = new SolidColorBrush(Colors.Red); storyboard.Begin(control); rootClock.Tick(TimeSpan.FromSeconds(0)); Assert.AreEqual(Colors.Green, ((SolidColorBrush)control.Background).Color); rootClock.Tick(TimeSpan.FromSeconds(0.5)); Assert.IsTrue(Color.FromArgb(255, 0, (byte)(Colors.Green.G / 2), (byte)(Colors.Blue.B / 2)).IsClose(((SolidColorBrush)control.Background).Color)); rootClock.Tick(TimeSpan.FromSeconds(1)); Assert.AreEqual(Colors.Blue, ((SolidColorBrush)control.Background).Color); }