-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpropbind.template.xml
42 lines (39 loc) · 1.34 KB
/
propbind.template.xml
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
<?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>propbind</Shortcut>
<_Description>Creates a bindable property</_Description>
<TemplateType>Unknown</TemplateType>
</Header>
<Variables>
<Variable name="Some">
<Default>Field</Default>
</Variable>
<Variable name="SomeType">
<Default>string</Default>
</Variable>
<Variable name="SomeClass">
<Default>MyClass</Default>
</Variable>
</Variables>
<Code><![CDATA[public static BindableProperty $Some$Property =
BindableProperty.Create(nameof($Some$), typeof($SomeType$), typeof($SomeClass$), default($SomeType$),
propertyChanged: (bindable, oldValue, newValue) =>
{
var new$SomeType$ = newValue as $SomeType$;
var current = bindable as $SomeClass$;
if (current != null)
{
}
});
public $SomeType$ $Some$
{
get { return ($SomeType$)GetValue($Some$Property); }
set { SetValue($Some$Property, value); }
} ]]></Code>
</CodeTemplate>
</CodeTemplates>