Created
September 4, 2025 23:39
-
-
Save pictos/db36b289bed12fbb49897327c5d06977 to your computer and use it in GitHub Desktop.
BP.snippet
This file contains hidden or 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> | |
| <SnippetTypes> | |
| <SnippetType>Expansion</SnippetType> | |
| </SnippetTypes> | |
| <Title>BindableProperty</Title> | |
| <Author> | |
| </Author> | |
| <Description> | |
| </Description> | |
| <HelpUrl> | |
| </HelpUrl> | |
| <Shortcut>propbd</Shortcut> | |
| </Header> | |
| <Snippet> | |
| <Declarations> | |
| <Literal Editable="true"> | |
| <ID>PropertyName</ID> | |
| <ToolTip>PropertyName</ToolTip> | |
| <Default>PropertyName</Default> | |
| <Function> | |
| </Function> | |
| </Literal> | |
| <Literal Editable="true"> | |
| <ID>PropertyType</ID> | |
| <ToolTip>PropertyType</ToolTip> | |
| <Default>PropertyType</Default> | |
| <Function> | |
| </Function> | |
| </Literal> | |
| <Literal Editable="true"> | |
| <ID>DeclaringType</ID> | |
| <ToolTip>DeclaringType</ToolTip> | |
| <Default>DeclaringType</Default> | |
| <Function> | |
| </Function> | |
| </Literal> | |
| <Literal Editable="true"> | |
| <ID>DefaultValue</ID> | |
| <ToolTip>DefaultValue</ToolTip> | |
| <Default>DefaultValue</Default> | |
| <Function> | |
| </Function> | |
| </Literal> | |
| </Declarations> | |
| <Code Language="csharp" Delimiter="$"><![CDATA[public static readonly BindableProperty $PropertyName$Property = | |
| BindableProperty.Create(nameof($PropertyName$), typeof($PropertyType$), typeof($DeclaringType$),$DefaultValue$); | |
| public $PropertyType$ $PropertyName$ | |
| { | |
| get => ($PropertyType$)GetValue($PropertyName$Property); | |
| set => SetValue($PropertyName$Property, value); | |
| }]]></Code> | |
| </Snippet> | |
| </CodeSnippet> | |
| </CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment