Last active
          February 7, 2017 17:44 
        
      - 
      
 - 
        
Save philcleveland/f75213fa3e1412b011e4 to your computer and use it in GitHub Desktop.  
    Xamarin ReactiveUI Snippets
  
        
  
    
      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
    
  
  
    
  | public ReactiveCommand<$type$> $name$ { get; private set; } | 
  
    
      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
    
  
  
    
  | 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; } | |
| } | 
  
    
      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
    
  
  
    
  | private ObservableAsPropertyHelper<$type$> _$name$; | |
| public $type$ $name$ | |
| { | |
| get {return _$name$.Value;} | |
| } | 
  
    
      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
    
  
  
    
  | private $type$ _$name$; | |
| public $type$ $name$ | |
| { | |
| get {return _$name$;} | |
| set { this.RaiseAndSetIfChanged(ref _$name$, value); } | |
| } | 
  
    
      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
    
  
  
    
  | Locator.CurrentMutable.Register(() => new $name$View(), typeof(IViewFor<$name$ViewModel>)); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment