I created the following simple Snippet
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Observable Property</Title>
<Description>Generates an Observable property based on type and Name</Description>
<Shortcut>nosp</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>PropertyName</ID>
<ToolTip>Defines the Property Name</ToolTip>
<Default>Name</Default>
</Literal>
<Literal>
<ID>PropertyType</ID>
<Type>Type</Type>
<ToolTip>Defines the Property Type</ToolTip>
<Default>String</Default>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[
public $PropertyType$ $PropertyName$
{
get { return Get<$PropertyType$>("$PropertyName$"); }
set
{
Set("$PropertyName$", value);
}
}
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
And its working as expected to create for example
public VirtualKeyCode Key
{
get { return Get<VirtualKeyCode>("Key"); }
set
{
Set("Key", value);
}
}
Is it possible to change all $PropertyType$ locations when one of them is changed after the initial insertion of the snippet for example during refactoring ?