36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
<?xml version="1.0" encoding="utf-8"?>
|
|
<CodeSnippets
|
|
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
|
|
<CodeSnippet Format="1.0.0">
|
|
<Header>
|
|
<Title>Prism DelegateCommand</Title>
|
|
<Shortcut>cmd</Shortcut>
|
|
<Author>Brian Lagunas</Author>
|
|
<Description>Creates a DelegateCommand property with an Execute method</Description>
|
|
<SnippetTypes>
|
|
<SnippetType>Expansion</SnippetType>
|
|
</SnippetTypes>
|
|
</Header>
|
|
<Snippet>
|
|
<Declarations>
|
|
|
|
<Literal>
|
|
<ID>CommandName</ID>
|
|
<ToolTip>Name of the DelegateCommand</ToolTip>
|
|
<Default>CommandName</Default>
|
|
</Literal>
|
|
</Declarations>
|
|
<Code Language="csharp">
|
|
<![CDATA[private DelegateCommand _$CommandName$;
|
|
public DelegateCommand $CommandName$ =>
|
|
_$CommandName$ ??= new DelegateCommand(Execute$CommandName$);
|
|
|
|
void Execute$CommandName$()
|
|
{
|
|
$end$
|
|
}]]>
|
|
</Code>
|
|
</Snippet>
|
|
</CodeSnippet>
|
|
</CodeSnippets>
|