Created
January 19, 2014 14:05
-
-
Save tanaka-takayoshi/8505439 to your computer and use it in GitHub Desktop.
Code Snippet for MvxCommand of MvvmCross with VisualStudio.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
<Title>Mvx Command</Title> | |
<Author>tanaka_733</Author> | |
<Description>Creates and initializes a new MvxCommand.</Description> | |
<HelpUrl></HelpUrl> | |
<Shortcut>xcommand</Shortcut> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal Editable="true"> | |
<ID>BackingFieldName</ID> | |
<ToolTip>Backing Field name</ToolTip> | |
<Default>myCommand</Default> | |
<Function> | |
</Function> | |
</Literal> | |
<Literal Editable="true"> | |
<ID>CommandName</ID> | |
<ToolTip>Command name</ToolTip> | |
<Default>MyCommand</Default> | |
<Function> | |
</Function> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[private MvxCommand $BackingFieldName$; | |
public MvxCommand $CommandName$ | |
{ | |
get | |
{ | |
return $BackingFieldName$ | |
?? ($BackingFieldName$ = new MvxCommand(Execute$CommandName$)); | |
} | |
} | |
private void Execute$CommandName$() | |
{ | |
$end$ | |
}]]></Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment