-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommand.Add.snippet
More file actions
40 lines (37 loc) · 1.08 KB
/
Command.Add.snippet
File metadata and controls
40 lines (37 loc) · 1.08 KB
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
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Command.Add</Title>
<Author>DESKTOP-T2ILVC6</Author>
<Description />
<HelpUrl></HelpUrl>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Keywords>
<Keyword></Keyword>
</Keywords>
<Shortcut />
</Header>
<Snippet>
<References />
<Imports />
<Declarations />
<Code Language="CSharp" Kind="method body" Delimiter="$"><![CDATA[public static readonly BindableProperty CommandProperty = BindableProperty.Create("Command", typeof(ICommand), typeof(AlarmEditTableCell));
public ICommand Command
{
get { return (ICommand)GetValue(CommandProperty); }
set { SetValue(CommandProperty, value); }
}
Command = new Command(async (o) =>
{
/// callback to command
});
if (Command != null && Command.CanExecute(null))
{
Command.Execute(o_args);
}]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>