Created
May 16, 2022 17:19
-
-
Save icebeam7/d05db6efbe330534d5a235623586b825 to your computer and use it in GitHub Desktop.
MVVM Property Snippet
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>MVVM Property</Title> | |
<Author>Luis</Author> | |
<Description>Creates a View Model Full Property.</Description> | |
<Shortcut>mvvmprop</Shortcut> | |
</Header> | |
<Snippet> | |
<Code Language="CSharp"> | |
<![CDATA[private $type$ $field$; | |
public $type$ $property$ | |
{ | |
get { return $field$;} | |
set { SetProperty(ref $field$, value);} | |
} | |
$end$]]> | |
</Code> | |
<Declarations> | |
<Literal> | |
<ID>field</ID> | |
<ToolTip>Private field.</ToolTip> | |
<Default>myVar</Default> | |
</Literal> | |
<Literal> | |
<ID>property</ID> | |
<ToolTip>Public property.</ToolTip> | |
<Default>myProp</Default> | |
</Literal> | |
<Literal> | |
<ID>type</ID> | |
<ToolTip>Property type</ToolTip> | |
<Default>int</Default> | |
</Literal> | |
</Declarations> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment