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)
'Usage
Dim instance As FrameworkElement
Dim value As Object
value = instance.Tag
instance.Tag = value
'Declaration
Public Property Tag As Object
Get
Set
<frameworkElement>
<frameworkElement.Tag>
object*
</frameworkElement.Tag>
</frameworkElement>
<frameworkElement Tag="string"/>
XAML Values
- object*
A Silverlight object or a custom object that supports object element syntax (must be nonabstract and must support a public parameterless constructor).
- string
A string value (can be a true string, or input for an object type that supports type conversion from string).
Property Value
Type:
System..::.ObjectThe intended value. This property has no default value.
Dependency property identifier field: TagProperty
This property is analogous 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 subclass from FrameworkElement or a derived class.
Because this property takes an object, the 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 Silverlight or XAML XML namespaces and therefore may require namespace mapping to the external namespace in order to be introduced as XAML object elements.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Reference
Other Resources