Skip to content

Instantly share code, notes, and snippets.

@nuitsjp
Created July 9, 2016 06:40
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 nuitsjp/64af138b86a1a17be6296c0f86c4789e to your computer and use it in GitHub Desktop.
Save nuitsjp/64af138b86a1a17be6296c0f86c4789e to your computer and use it in GitHub Desktop.
WPFやXamarinのICommandを改めて整理する VM①
public DelegateCommand ExecuteCommand { get; }
public MainWindowViewModel()
{
ExecuteCommand =
new DelegateCommand(
() => Result = "登録されました",
CanExecute);
}
private bool CanExecute()
{
return !string.IsNullOrWhiteSpace(Name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment