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.

ParthianShot

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."

Ouch.

 

 

 

 

 

 

— 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.

 

 

Share

About Jesse Liberty

Jesse Liberty is an independent consultant and programmer with three decades of experience writing and delivering software projects. He is the author of 2 dozen books and multiple Pluralsight courses, and has been 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, Microsoft MVP and Telerik MVP.
This entry was posted in z Silverlight Archives. Bookmark the permalink.

Leave a Reply

Your email address will not be published.