SetTargetName Method

Storyboard.SetTargetName Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Causes the specified Timeline to target the object with the specified name.

Namespace:  System.Windows.Media.Animation
Assembly:  System.Windows (in System.Windows.dll)

public static void SetTargetName(
	Timeline element,
	string name


Type: System.Windows.Media.Animation.Timeline
The timeline that targets the specified dependency object.
Type: System.String
The name of the object to target.

As with SetTarget, the user is still required to hook up the desired property using SetTargetProperty for the animation. This is the same model as XAML: specify a target as well as a target property.

This method supports the Storyboard.TargetName attached property.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2017 Microsoft