我可以在基于任务的 DelegateCommand (Prism.Commands) 中使用参数:
(https://prismlibrary.com/docs/commanding.html)
public class ArticleViewModel
{
public DelegateCommand SubmitCommand { get; private set; }
public ArticleViewModel()
{
SubmitCommand = new DelegateCommand<object>(async ()=> await Submit());
}
Task Submit(object parameter)
{
return SomeAsyncMethod(parameter);
}
}