The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FrameworkElement.Tag Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets an arbitrary object value that can be used to store custom information about this object.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public Object Tag { get; set; }
<frameworkElement Tag="string"/>

XAML Values


A Windows Phone object or a custom object that supports object element syntax (the backing type must be nonabstract and must support a public default constructor).


A string value (can be a true string, or input for an object type that supports type conversion from string).

Property Value

Type: System.Object
The intended value. This property has no default value.

Dependency property identifier field: TagProperty

This property is similar to Tag properties in other programming models. Tag is intended to provide a preexisting property location where you can store some basic custom information about any FrameworkElement without requiring you to derive from FrameworkElement or an intermediate class.

Because this property takes an object, a property element usage is required to set the Tag property in XAML to anything other than an object with a type converter, such as a string. Objects used in this manner are typically not within the standard XAML namespaces and therefore may require mapping an external namespace in order to be introduced as XAML object elements.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone