Skip to content

Instantly share code, notes, and snippets.

@andreas-nesheim
Created May 14, 2022 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreas-nesheim/614a8629e7e939330e917cc871c10b8f to your computer and use it in GitHub Desktop.
Save andreas-nesheim/614a8629e7e939330e917cc871c10b8f to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>CommunityToolkit.Mvvm property</Title>
<Shortcut>propop</Shortcut>
<Description>Code snippet for ObservableProperty using the CommunityToolkit.Mvvm</Description>
<Author>Andreas Nesheim</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<ToolTip>Variable type</ToolTip>
<Default>int</Default>
</Literal>
<Literal>
<ID>variable</ID>
<ToolTip>Variable name</ToolTip>
<Default>myVar</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[
[ObservableProperty]
private $type$ $variable$;
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment