Created
October 28, 2013 13:44
-
-
Save olexale/7197027 to your computer and use it in GitHub Desktop.
MvvmCross snippets for Visual Studio
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> | |
<Title>MvvmCross command</Title> | |
<Shortcut>cmvx</Shortcut> | |
<Description>Code snippet for MvvmCross command</Description> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>myCommand</ID> | |
<ToolTip>Private command name</ToolTip> | |
<Default>myCommand</Default> | |
</Literal> | |
<Literal> | |
<ID>MyCommand</ID> | |
<ToolTip>Public command name</ToolTip> | |
<Default>MyCommand</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"><![CDATA[ | |
MvxCommand _$myCommand$; | |
public System.Windows.Input.ICommand $MyCommand$ { | |
get { | |
_$myCommand$ = _$myCommand$ ?? new MvxCommand(Do$MyCommand$); | |
return _$myCommand$; | |
} | |
} | |
void Do$MyCommand$ () | |
{ | |
$end$ | |
} | |
]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
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> | |
<Title>MvvmCross property</Title> | |
<Shortcut>pmvx</Shortcut> | |
<Description>Code snippet for MvvmCross proprty</Description> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>type</ID> | |
<ToolTip>Type of the property</ToolTip> | |
<Default>string</Default> | |
</Literal> | |
<Literal> | |
<ID>privateName</ID> | |
<ToolTip>Private name</ToolTip> | |
<Default>privateProperty</Default> | |
</Literal> | |
<Literal> | |
<ID>publicName</ID> | |
<ToolTip>Public name</ToolTip> | |
<Default>PublicProprty</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"><![CDATA[ | |
$type$ _$privateName$; | |
public $type$ $publicName$ { | |
get { return _$privateName$; } | |
set { _$privateName$ = value; RaisePropertyChanged ("$publicName$"); } | |
} | |
$end$ | |
]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment