views:

44

answers:

2

Hello. I'm being used to create Dependency Properties for my custom controls. But i'm really tired of defining static fields, populating them in the constructors, coding the standard properties and later the events, plus casting and validating objects, all despite the help of copy & paste and code snippets.

So, the question is... is there any effort, initiative, crowd-petition, framework, tool, project or idea to make the creation of dependency properties EASIER?

Maybe a C# 5.0 pre CTP of "Compiler as Service" and "Meta-Programming" to define such complex WPF/Silverlight features. That would be so helpful!

+5  A: 

There are several out of the box code snippets Visual Studio defines:

propdp[TAB]

Dependency property

propa[TAB]

Attached property

I use them all the time! :)

Arcturus
+1 Excellent! That is news to me.
Jakob Christensen
+1  A: 

In VS2010 (not sure about 2008) you can use the built in code snippets: type propdp and press Tab twice to create a DependencyProperty definition.

Dan Puzey