Skip to content

Instantly share code, notes, and snippets.

@adamped
Created November 12, 2015 05:04
Show Gist options
  • Save adamped/98ef5bee0d5f5df0fc74 to your computer and use it in GitHub Desktop.
Save adamped/98ef5bee0d5f5df0fc74 to your computer and use it in GitHub Desktop.
<Button Command="{Binding LoginCommand}" Text="Login" />
private RelayCommand _loginCommand;
public RelayCommand LoginCommand
{
get
{
return _loginCommand
?? (_loginCommand = new RelayCommand(
async () =>
{
// ... Do something here ...
}));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment