In Silverlight, Tags are just strings…

[Updated with trivial, off-topic comment (at bottom of post) on 5/26]

Tim Binkley-Jones sent in a Tip of the Day that custom attached properties make a superior choice to Tags because, in Silverlight, Tags can only be strings.

This is not what I've been saying, but he is right; I was wrong.

He provides this excellent blog entry in which he explains the problem and the solution: custom attached properties.


His Parthian Shot: "A custom attached property is the tool of a Silverlight/WPF developer.  Not as clumsy or random as a Tag, but an elegant tool for a more civilized technology."








— Update 5/26 – Off point bit of personal trivia that explains the picture above —

When I was  a kid with few friends and no social skills, I used to make bizarre lists. Among them were brand names used as generics (yo-yo, fridge, xerox, jello, vaseline, scotch tape, kleenex, etc.) My favorite list was "phrases or words misused because the original is obscure but sounds like something common" I believe I had over 100 at one point

This latter list had on it

Original phrase Phrase it morphed into
Champing at the bit Chomping at the bit
On tenter hooks On tender hooks (interesting image)
Parthian shot Parting shot

Wikipedia: The Parthian shot was a military tactic employed by the Parthians, an ancient Iranian people. The Parthian archers, mounted on light horse, would feign retreat; then, while at a full gallop, turn their bodies back to shoot at the pursuing enemy. The maneuver required superb equestrian skills, since the rider's hands were occupied by his bow, leaving only pressure from his legs to guide his horse.



About Jesse Liberty

Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen Pluralsight & LinkedIn Learning courses. He was a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a Xamarin Certified Mobile Developer and a Xamarin MVP and a Microsoft MVP.
This entry was posted in z Silverlight Archives. Bookmark the permalink.