开发者

How to create a Template for a ViewModel and View?

I was wondering if it is possible to create a template for a view model and view.

I would like to add a common structure to both, so when i add the new ViewModel or View it will all ready have all my common regions, fields, constructors, properties and methods.

So when i add the new Vi开发者_如何学GoewModel or View it will all ready have all the code i need to create it.

Note: I am not talking about ViewModelBase or ViewBase. I have that in place.


I've used the codeplex toolkit before, which I found pretty useful:


I'm not sure if I get you correctly, but have a look at Visual Studio Templates. If you need examples for templates have a look at MVVMLight it contains several templates for custom classes and views.

Another possibility (or rather a poor mans version) for a template would be a codesnippet.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜