TextElement.Name Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets a unique identification for the object. Name can only be set from initial parsing of XAML.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<textElement Name="xamlNameString" ... />
Property Value
Type: System.StringThe unique identifier for the object. This property is read-only for code, but write-only for XAML, due to special parser handling of XAML properties named "Name".
TextElement is not a FrameworkElement. FrameworkElement is the class that implements Name support for most other Windows Phone objects, such as Canvas, but TextElement cannot be a FrameworkElement because it must function as a true inline for rendering and layout considerations. Therefore TextElement supports its own Name and FindName implementations so that you can still retrieve XAML-instantiated instances of TextElement classes such as Run at run time, and you can arbitrarily call FindName again on any Windows Phone object you retrieved from calling FindName previously.