To reuse templates simply copy these files to the appropriate location
~Library/VisualStudio/<version>/Snippets
%AppData%\VisualStudio\<version>\Snippets
<?xml version="1.0" encoding="utf-8"?> | |
<CodeTemplates version="3.0"> | |
<CodeTemplate version="2.0"> | |
<Header> | |
<_Group>C#</_Group> | |
<Version /> | |
<MimeType>text/x-csharp</MimeType> | |
<Shortcut>isafe</Shortcut> | |
<_Description>SetUseSafeArea for margins on iPhone X and similar</_Description> | |
<TemplateType>Unknown</TemplateType> | |
</Header> | |
<Variables /> | |
<Code><![CDATA[On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);]]></Code> | |
</CodeTemplate> | |
</CodeTemplates> |
<?xml version="1.0" encoding="utf-8"?> | |
<CodeTemplates version="3.0"> | |
<CodeTemplate version="2.0"> | |
<Header> | |
<_Group>C#</_Group> | |
<Version /> | |
<MimeType>text/x-csharp</MimeType> | |
<Shortcut>pprism</Shortcut> | |
<_Description>Template for observable property in Prism</_Description> | |
<TemplateType>Expansion</TemplateType> | |
</Header> | |
<Variables> | |
<Variable name="type"> | |
<Default>Object</Default> | |
</Variable> | |
<Variable name="name"> | |
<Default>_myProperty</Default> | |
</Variable> | |
<Variable name="Name"> | |
<Default>MyProperty</Default> | |
</Variable> | |
</Variables> | |
<Code><![CDATA[private $type$ $name$; | |
public $type$ $Name$ { | |
get { return $name$; } | |
set { SetProperty(ref $name$, value); } | |
}]]></Code> | |
</CodeTemplate> | |
</CodeTemplates> |
<?xml version="1.0" encoding="utf-8"?> | |
<CodeTemplates version="3.0"> | |
<CodeTemplate version="2.0"> | |
<Header> | |
<_Group>C#</_Group> | |
<Version /> | |
<MimeType>text/x-csharp</MimeType> | |
<Shortcut>pprismr</Shortcut> | |
<_Description>Template for observable property in Prism that notifies another property</_Description> | |
<TemplateType>Expansion</TemplateType> | |
</Header> | |
<Variables> | |
<Variable name="type"> | |
<Default>Object</Default> | |
</Variable> | |
<Variable name="name"> | |
<Default>_myProperty</Default> | |
</Variable> | |
<Variable name="Name"> | |
<Default>MyProperty</Default> | |
</Variable> | |
<Variable name="raise"> | |
<Default>NotifyMe</Default> | |
</Variable> | |
</Variables> | |
<Code><![CDATA[private $type$ $name$; | |
public $type$ $Name$ { | |
get { return $name$; } | |
set { SetProperty(ref $name$, value, () => RaisePropertyChanged(nameof($raise$))); } | |
}]]></Code> | |
</CodeTemplate> | |
</CodeTemplates> |
To reuse templates simply copy these files to the appropriate location
VS Mac
~Library/VisualStudio/<version>/Snippets
VS Windows
%AppData%\VisualStudio\<version>\Snippets