Storyboard.TargetName attached property

This topic has not yet been rated - Rate this topic

Gets or sets the name of the object to animate.


<object Storyboard.TargetName="nameString" />

XAML Values

nameString

The Name or x:Name value of the element where the property to be animated exists.

Remarks

Storyboard.TargetName is an attached property, which supports a XAML usage. When getting this property in code, use GetTargetName. When setting this property in code, use SetTargetName instead. In code usages, the target parameter is the object where the attached property value is set. Another way to get or set the value in code is to use the dependency property system, calling either GetValue or SetValue and passing TargetNameProperty as the dependency property identifier.

The value of Storyboard.TargetName must refer to an existing element that has that same string assigned as its Name or x:Name attribute.

Attempting to set Storyboard.TargetName on a running animation will cause a run-time error. However, you can retarget an existing animation is stopped or not yet running. If you do so, be careful not to retarget an animation to the wrong type of target (one that does not use the existing Storyboard.TargetProperty). Otherwise, you will get a run-time error.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.Xaml.Media.Animation

Metadata

Windows.winmd

See also

Storyboard

 

 

Build date: 12/4/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.