WPF MVVM in Telerik JustCode


JustCode is a productivity tool from telerik that helps refactoring your code, delivers code analysis and helps in error checking. On first sight it may seem that for MVVM there isn't much available out of the box. But if you look a bit closer you will find that JustCode supports code templates and these allow you to create flexible code snippets. For example, you may want to implement INotifyPropertyChanged and generate a class property that uses the PropertyChanged function.

private $3=GET_ELEMENT_TYPE($1$)$ $1$;

get {return  $1=SELECT_VARIABLE()$;}
if($1$ == value)
$1$ = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("$2$"));

Give the code template an acronim => I use   "In" (for I Notify)

in your class then press  "Shift+Space" and type "In" and you will find that a Property will be generated for you, where all you need to fill in is the field and property names. JustCode will automatically use your field name on several places where necessary. You can just press tab to move between the Three variables to fill in. Once done, just press enter.

Creating a property will take about 10 seconds, while otherwise it could take over a minute or even Two minutes in order to just type it.


Leave a Reply