For those who don't know what is VS code snippet.
Type 'propdp' ->Tab
After getting the snippet we can change it's parameters according to our requirement.
DP Snippet in Silverlight
It was working well until I used the same in Silverlight.The default dp snippet in VS inserts a DP which uses metadata object of type UIPropertyMetadata.But this class is not available in Silverlight.Compile time error!!!!!
So I modified the dp snippet code to make it compatible with Silverlight.Using this you can insert DPs in silverlight without compilation error.
- Download the snippet file from here.
- Open Visual studio
- Tools->Code snippet manager
- Select language 'C#'
- Click 'Import'
- Locate the downloaded .snippet file.
- Select the folder for storing snippt.
- Click Finish.
- You can see the snippet in the code snippet manager.
- Now in Silverlight project you can use this snippet.
If you are interested in testing more snippets get more from http://gotcodesnippets.com/