.net Maui中的ASYNCCOMMAND
我似乎找不到.net Maui或.Net Maui社区工具包中的asynccommand
。知道我能找到哪个软件包/名称空间?
I can't seem to find AsyncCommand
in .NET MAUI or .NET MAUI Community Toolkit. Any idea what package/namespace I can find it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
https://devblogs.microsoft.com/dotnet/introducing-the-net-net-maui-community-toolkit-toolkit-preview/#what to-to-to-to-expect-in-net-net-net-maui-toolkit
https://devblogs.microsoft.com/dotnet/introducing-the-net-maui-community-toolkit-preview/#what-to-expect-in-net-maui-toolkit
即使问题已被标记为解决,也可能会从约翰·蒂里特(John Thiriet)撰写的这种解决方案中获利。我实施了它,它运行良好。
https://johnthiriet.com/moveriet.com/mvvm-mmvvm-onemvvm-oneganc-wosh-yanc-wosh-onganc-oneganc-wosh-yand-andas-yanc-wonc-with-ashync-with-ashync-async-ashync- -command/
然后,它可以像Xamarin一样在MAUI中使用。
Even if the question has been marked as solved, someone might profit from this solution written by John Thiriet. I implemented it and it worked fine.
https://johnthiriet.com/mvvm-going-async-with-async-command/
Then it can be used in MAUI just like in Xamarin.
安装CommunityToolKitMvvm 8.0.0
install CommunityToolkitMVVM 8.0.0
将asyncawaitbestpractices.mvvm nuget软件包添加到您的项目中,以使asynccommand返回。
有关更多信息,请参见GitHub项目页面: https://github.com/github.com/github.com/brminnick/brminnick/asyncawaitbestpractices
Add the AsyncAwaitBestPractices.MVVM Nuget package to your project to get the AsyncCommand back.
For more information see the Github project page: https://github.com/brminnick/AsyncAwaitBestPractices
public iaSyncrelayCommand scancommand => this.scancommand ?? =新的asyncrelayCommand(this.scannetworksasync);
public IAsyncRelayCommand ScanCommand => this.scanCommand ??= new AsyncRelayCommand(this.ScanNetworksAsync);