Skip to content

Instantly share code, notes, and snippets.

@J-Swift
Created May 14, 2020 19:19
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 J-Swift/640359ec796e8c044ea1dbb9bc23aeee to your computer and use it in GitHub Desktop.
Save J-Swift/640359ec796e8c044ea1dbb9bc23aeee to your computer and use it in GitHub Desktop.
Xamarin.Forms BindableProperty Property
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<shortcut>bp</shortcut>
<Title>Bindable Property</Title>
<Author>Jimmy Reichley</Author>
<Description>Inserts boilerplate for BindableProperty property</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>PropertyType</ID>
<Default>Klass</Default>
<ToolTip>Choose the type of the property.</ToolTip>
</Literal>
<Literal>
<ID>PropertyName</ID>
<Default>FieldName</Default>
<ToolTip>Choose the name of the property.</ToolTip>
</Literal>
</Declarations>
<Code Language="CSharp">
<![CDATA[
public $PropertyType$ $PropertyName$
{
get { return ($PropertyType$)GetValue($PropertyName$Property); }
set { SetValue($PropertyName$Property, value); }
}
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
@J-Swift
Copy link
Author

J-Swift commented May 14, 2020

Place at Documents\Visual Studio 2019\Code Snippets\Visual C#\My Code Snippets\BindableProperty.snippet

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