I need to add some meta data to some rectangles I have created in a wpf application that is associated with each rectangle.
Like I have a string associated with each rectangle.
I have been putting this string in the tooltip so I can access it in code associated with the rectangle, but obviously there’s a better solution to this, I’m just not sure what it is.
How can I do this properly?
Just use Tag property for that.
http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.tag.aspx