Tag

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets an object that can be used for user storage or information passing.

<object Tag="objectvalue"  .../>
value = object.tag
object.tag = value

Property Value

Type: string

An arbitrary, user-determined string.

This property is read/write. The default value is null.

Managed Equivalent

Tag

Remarks

This property is similar to "Tag" in other programming models; it provides a property that can be used to pass information between objects, or that can provide a means of customization or differentiation between defined object types.

Applies To

Border (Silverlight 2)

Canvas

Ellipse

Glyphs

Image

InkPresenter

Line

MediaElement

PasswordBox (Silverlight 2)

Path

Polygon

Polyline

Popup (Silverlight 2)

Rectangle

StackPanel (Silverlight 2)

TextBlock

TextBox (Silverlight 2)

See Also

Reference