Storyboard.TargetName Attached Property
Gets or sets the name of the object to animate. The object must be a FrameworkElement, FrameworkContentElement, or Freezable.
Assembly: PresentationFramework (in PresentationFramework.dll)
Property Value
Type: System.StringThe name of the FrameworkElement, FrameworkContentElement, or Freezable to animate.
Setting this property is optional. If the TargetName is not specified, a storyboard's animations are applied to one of the following:
If the storyboard to which the animation belongs was started using a BeginStoryboard, the element that owns the BeginStoryboard action that triggers the storyboard is targeted.
If the storyboard was started using the Begin method, the FrameworkElement or FrameworkContentElement specified when the storyboard was started with the Begin method is targeted.
When this property is set on a timeline with children, those child timelines "inherit" the parent's TargetName unless they specify their own.
When using XAML, you perform one of the following two actions to make an object targetable by a storyboard:
If the object is a FrameworkElement or a FrameworkContentElement, set its Name property.
If the object is a Freezable or a custom FrameworkContentElement or FrameworkContentElement, assign it a name using the x:Name Directive markup extension.
When using code, you make an object targetable by using the RegisterName method to assign the object a name.
Identifier field | |
Metadata properties set to true | None |