Silverlight Attached/Dependency Properties code snippet update

Friday, November 21, 2008 1:01 PM

I noticed while working with Attached Properties and Dependency Properties that the code snippet is wrong.  It keeps on trying using the UIPropertyMetadata.  My guess is that this is an older version of the Register methods.  So, here is a link (to my skydrive) that you can download and update your code snippets: cid-af5c4f2a863b6b78.skydrive.live.com/browse.aspx/Public/AttachedDependencyProperty%20Snippets.   Just download the two snippets and place them in your "%Program Files%\Microsoft Visual Studio 9.0\VC#\Snippets\1033\NetFX30" directory on your development machine.  Next time you use the snippet(s), they'll be updated!

Update 11/28:  Laurent has pointed out that the code snippets using UIPropertyMetadata are for WPF.  So, I've updated the code snippets on my skydrive.  "propa" and "propdp" have been reverted to their original snippet form.  I've added two snippets "slpropa" and "slpropdp" for use within silverlight.  Thank you Laurent for pointing that out.


Feedback

# re: Silverlight Attached/Dependency Properties code snippet update

Hi Jeff,

Actually, the propa and propdp snippets are not for Silverlight, but for WPF. There, the UIPropertyMetaData can be used for AttachedProperties and DPs. I suggest leaving these untouched and creating new snippets named (for instance) slpropa and slpropdp.

Cheers,
Laurent 11/28/2008 1:17 PM | Laurent

Post a comment





 

Please add 4 and 4 and type the answer here: