Skip to content

Instantly share code, notes, and snippets.

@Juansero29
Created September 25, 2019 13:40
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 Juansero29/cf38a215abafb99c5b33010e737a4557 to your computer and use it in GitHub Desktop.
Save Juansero29/cf38a215abafb99c5b33010e737a4557 to your computer and use it in GitHub Desktop.
Code snippet for an automatically implemented region in XAML. It's targeted to use within Xamarin.Forms. Type 'regx' to access it easily on a XAML Code Editor window.
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>XAML Regions</Title>
<Author>Juan R. (Juansero29)</Author>
<Shortcut>regx</Shortcut>
<Description>
Code snippet for an automatically implemented region in XAML.
It's targeted to use within Xamarin.Forms.
Type 'regx' to access it easily on a XAML Code Editor window.
Language Version: C# 4.0 or higher
</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal Editable="true">
<ID>RegionName</ID>
<ToolTip>Enter the name for this region</ToolTip>
<Default>MyRegion</Default>
</Literal>
<Literal Editable="true">
<ID>Xaml</ID>
<ToolTip>The XAML that will be inside your region</ToolTip>
<Default>MyXAML</Default>
</Literal>
</Declarations>
<Code Language="xaml">
<![CDATA[
<!--#region $RegionName$-->
< $Xaml$ />
<!--#endregion-->
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment