Skip to content

Instantly share code, notes, and snippets.

@alexsorokoletov
Last active December 20, 2016 19:59
Show Gist options
  • Save alexsorokoletov/d2cdf4f19bcb9c4145b0 to your computer and use it in GitHub Desktop.
Save alexsorokoletov/d2cdf4f19bcb9c4145b0 to your computer and use it in GitHub Desktop.
MvvmCross ViewModel Property Changed Xamarin Studio Snippet
<?xml version="1.0" encoding="utf-8"?>
<!-- copy to ~/Library/XamarinStudio-5.0/Snippets/ as vmpc.template.xml -->
<CodeTemplates version="3.0">
<CodeTemplate version="2.0">
<Header>
<_Group>C#</_Group>
<Version />
<MimeType>text/x-csharp</MimeType>
<Shortcut>vmpc</Shortcut>
<_Description>property changed</_Description>
<TemplateType>Expansion</TemplateType>
</Header>
<Variables>
<Variable name="type">
<Default>string</Default>
</Variable>
<Variable name="name">
<Default>Message</Default>
</Variable>
</Variables>
<Code><![CDATA[private $type$ _$name$;
public $type$ $name$
{
get { return _$name$; }
set { SetProperty(ref _$name$, value); }
}]]></Code>
</CodeTemplate>
</CodeTemplates>
@aiguo
Copy link

aiguo commented Sep 17, 2015

It is really helpful. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment