Skip to content

Instantly share code, notes, and snippets.

@CuriousCurmudgeon
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CuriousCurmudgeon/02776ac2f21d74fe9569 to your computer and use it in GitHub Desktop.
Save CuriousCurmudgeon/02776ac2f21d74fe9569 to your computer and use it in GitHub Desktop.
TileViewModel
public class TileViewModel : MvxViewModel
{
private readonly ITileService _tileService;
public TileViewModel(ITileService tileService)
{
_tileService = tileService;
}
private string _color;
public string Color
{
get { return _color; }
set { _color = value; RaisePropertyChanged(() => Color); }
}
public IMvxCommand UpdateState
{
get
{
return new MvxCommand(async () =>
{
await _tileService.UpdateStateAsync(this);
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment