Greycastle Logo

View model property generation

Every time I set up a new environment I have to rewrite this short template for generating view model properties in Resharper. It only takes a minute or two but after doing it like twenty times now I decided I’d put it here to reuse instead. This version of the template generates a private backing field for a get and set view model property that uses MVVM Lights Set() method to notify the property changed.

This is how it looks:

ViewModel Property Template

And here you can download the [Resharper template file](/ViewModel Property Template.DotSettings “Resharper template file for MVVM Light ViewModel property”) to import.

© 2024 Greycastle