Skip to content

Instantly share code, notes, and snippets.

@Olwaro
Created March 19, 2013 14:19
Show Gist options
  • Save Olwaro/5196473 to your computer and use it in GitHub Desktop.
Save Olwaro/5196473 to your computer and use it in GitHub Desktop.
VS snippet for RelayCommand
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>RelayCommand</Title>
<Author></Author>
<Description></Description>
<HelpUrl></HelpUrl>
<SnippetTypes />
<Keywords />
<Shortcut>rc</Shortcut>
</Header>
<Snippet>
<References />
<Imports />
<Declarations>
<Literal Editable="true">
<ID>Commande</ID>
<Type></Type>
<ToolTip />
<Default></Default>
<Function />
</Literal>
</Declarations>
<Code Language="csharp" Kind="" Delimiter="$"><![CDATA[ICommand $Commande$ = null;
public ICommand $Commande$
{
get
{
return $Commande$ ?? ($Commande$ = new RelayCommand(() =>
{
},
() =>
{
return true;
}));
}
}]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment