<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Dependency Property</Title>
<Shortcut>dp</Shortcut>
<Description>Code snippet for dependency property</Description>
<Author>David Sandor</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<ToolTip>Property type</ToolTip>
<Default>int</Default>
</Literal>
<Literal>
<ID>property</ID>
<ToolTip>Property name (name of the CLR property).</ToolTip>
<Default>MyProperty</Default>
</Literal>
<Literal>
<ID>className</ID>
<ToolTip>Name of the class that contains this DP.</ToolTip>
<Default>MyClass</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[
public $type$ $property$
{
get { return ($type$)this.GetValue($property$Property); }
set { this.SetValue($property$Property,value); }
}
public static readonly DependencyProperty $property$Property =
DependencyProperty.Register(
"$property$", typeof($type$), typeof($className$));
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>