-
-
Save jdmonty/bd2f12e27d2815459888 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>RxCommand</Title> | |
<Shortcut>rxcmd</Shortcut> | |
<Description>Code snippet for a ReactiveUI Command</Description> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>type</ID> | |
<ToolTip>Command type</ToolTip> | |
<Default>object</Default> | |
</Literal> | |
<Literal> | |
<ID>command</ID> | |
<ToolTip>Command name</ToolTip> | |
<Default>DoSomething</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[public ReactiveCommand<$type$> $command$ { get; private set; }$end$]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>IViewFor<T></Title> | |
<Shortcut>rx_iv4</Shortcut> | |
<Description>Generates the dependency prop for IViewFor</Description> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>classname</ID> | |
<ToolTip>View type</ToolTip> | |
<Function>ClassName()</Function> | |
<Default>ClassNamePlaceholder</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[public static readonly DependencyProperty ViewModelProperty = | |
DependencyProperty.Register("ViewModel", typeof($classname$Model), typeof($classname$), new PropertyMetadata(null)); | |
public $classname$Model ViewModel | |
{ | |
get { return ($classname$Model)GetValue(ViewModelProperty); } | |
set { SetValue(ViewModelProperty, value); } | |
} | |
object IViewFor.ViewModel | |
{ | |
get { return ViewModel; } | |
set { ViewModel = ($classname$Model)value; } | |
}$end$]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Rx ObservableAsPropertyHelper</Title> | |
<Shortcut>rxOAPH</Shortcut> | |
<Description>Code snippet for a ReactiveUI ObservableAsPropertyHelper</Description> | |
<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> | |
</Declarations> | |
<Code Language="csharp"><![CDATA[private ObservableAsPropertyHelper<$type$> _$property$; | |
public $type$ $property$ | |
{ | |
get {return _$property$.Value;} | |
}$end$]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>RxProp</Title> | |
<Shortcut>rxprop</Shortcut> | |
<Description>Code snippet for a Reactive property</Description> | |
<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> | |
</Declarations> | |
<Code Language="csharp"><![CDATA[private $type$ _$property$; | |
public $type$ $property$ | |
{ | |
get {return _$property$;} | |
set { this.RaiseAndSetIfChanged(ref _$property$, value); } | |
}$end$]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Rx View Registration</Title> | |
<Shortcut>rxreg</Shortcut> | |
<Description>Code snippet for a ReactiveUI View Registration</Description> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>viewType</ID> | |
<ToolTip>View Name</ToolTip> | |
<Default>My</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[Locator.CurrentMutable.Register(() => new $viewType$View(), typeof(IViewFor<$viewType$ViewModel>));$end$]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment