-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdprop.snippet
63 lines (61 loc) · 2.35 KB
/
dprop.snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?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>dprop</Shortcut>
<Description>Code snippet for Dependency Property.</Description>
<Author>Jordan S. Munroe</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</ToolTip>
<Default>MyProperty</Default>
</Literal>
<Literal>
<ID>container</ID>
<ToolTip>Containing dependency object.</ToolTip>
<Function>ClassName()</Function>
<Default>MyDependencyObject</Default>
</Literal>
<Literal>
<ID>comment</ID>
<ToolTip>Comment text.</ToolTip>
<Default>TODO: Add summary for this property.</Default>
</Literal>
<Literal>
<ID>framework</ID>
<ToolTip>Framework</ToolTip>
<Default>Framework</Default>
</Literal>
<Literal>
<ID>default</ID>
<ToolTip>Default value.</ToolTip>
<Default>null</Default>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[public static readonly DependencyProperty $property$Property = DependencyProperty.Register("$property$", typeof($type$), typeof($container$), new $framework$PropertyMetadata($default$));
/// <summary>
/// $property$ (readonly) - $comment$
/// </summary>
public $type$ $property$
{
get { return ($type$)GetValue($property$Property); }
set { SetValue($property$Property, value); }
}
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>