Provides an accessor that simplifies access to the NameScope registration method.
Assembly: PresentationFramework (in PresentationFramework.dll)
This method is a convenience method for calling RegisterName. The implementation will check successive parent elements until it finds the applicable NameScope implementation, which is found by finding an element that implements INameScope. For more information about namescopes, see WPF XAML Namescopes.
Calling is necessary in order to correctly hook up animation storyboards for applications when created in code. This is because one of the key storyboard properties, TargetName, uses a run-time name lookup instead of being able to take a reference to a target element. This is true even if that element is accessible by reference from the code. For more information on why you need to register names for storyboard targets, see Storyboards Overview. Animations for content elements are less common than animations on controls, the Storyboards Overview concentrates on control scenarios.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.