What is recommended way to perform async tasks in WPF?

后端 未结 4 1362
心在旅途
心在旅途 2021-01-18 12:52

Are there any standard tools, or recommended approaches for async tasks execution?

UPD I understand, how to use threads. I only need to know the recommended WPF way

4条回答
  •  隐瞒了意图╮
    2021-01-18 13:30

    Have a look at below post, it describes a way to create an async delegate command(using BackgroundWorker). I have used this kind of command in our application and it works fine and at the same time it provides a consistent way of doing things asynchronously.

    An Asynchronous Delegate Command for your WPF MVVM Apps - AsyncDelegateCommand http://amazedsaint.blogspot.com/2010/10/asynchronous-delegate-command-for-your.html

    A similar implementation is also mentioned here - Asynchronous WPF Commands

提交回复
热议问题