Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Storyboard.TargetName Attached Property

Gets or sets the name of the object to animate. The object must be a FrameworkElement, FrameworkContentElement, or Freezable.

Namespace:  System.Windows.Media.Animation
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

See GetTargetName, SetTargetName
<object Storyboard.TargetName="string" .../>

Property Value

Type: System.String
The name of the FrameworkElement, FrameworkContentElement, or Freezable to animate.

Identifier field

TargetNameProperty

Metadata properties set to true

None

Setting this property is optional. If the TargetName is not specified, a storyboard's animations are applied to one of the following:

When this property is set on a timeline with children, those child timelines "inherit" the parent's TargetName unless they specify their own.

Making an Object Targetable

When using XAML, you perform one of the following two actions to make an object targetable by a storyboard:

When using code, you make an object targetable by using the RegisterName method to assign the object a name.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft