Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVVMCross Code Snippets for Visual Studio?

Tags:

mvvmcross

where can I download the snippets for Visual Studio, the likes pf pmvx, cmvx and others? I though those would be available on the github projects, but can't find them...

like image 694
Sergio Avatar asked Aug 13 '13 04:08

Sergio


1 Answers

I've already created my own. Please remember that these are ReSharper's template.

mvxcom -> for Command

#region $region$ command
private MvxCommand _$NAME$Command;

public ICommand $PNAME$Command
{
    get
    {
       _$NAME$Command = _$NAME$Command ?? new MvxCommand(Do$PNAME$Command);
       return _$NAME$Command;
    }
}

private void Do$PNAME$Command()
{
    $END$        
}
#endregion

mvxprop -> for Properties

#region $region$
private $TYPE$ _$NAME$;
public $TYPE$ $PNAME$
{ 
get { return _$NAME$; }
set { _$NAME$ = value; RaisePropertyChanged(() => $PNAME$); }
}
#endregion
$END$

mvxset -> Binding Set

var set = this.CreateBindingSet<$VIEW$, $VIEW$Model>();
set.Bind($ELEMENT$).To(vm => vm$END$);
set.Apply();

You can add them to your ReSharper using ReSharper>Template Explorer>Live Templates>New Template.

Please feel free to change them however you desire.

like image 167
Aboo Avatar answered Oct 05 '22 22:10

Aboo