![]() ![]() ![]() When we click the Start button, the BackgroundWorker fires off a simulated long-running process (which uses the infamously slow "Sleep()" method). We have an input text box ("Iterations") that allows us to enter a number. Regardless of whether you are familiar with the BackgroundWorker component, I would highly recommend reviewing the walkthrough and sample code since our MVVM application is based on the original. From this link, you can get a walkthrough on using the component as well as the sample code that is used in the walkthrough. You can get an overview of using the component here: Keep Your UI Responsive with the BackgroundWorker Component. This article is not designed to teach you how to use the BackgroundWorker component. For our example, we will take the BackgroundWorker sample application that we used to demonstrate the component and modify it so that it is using MVVM.Ī few words about the BackgroundWorker component As always, whether it makes sense in your specific scenario will depend on a few different factors. The BackgroundWorker can also work in an application that uses the MVVM pattern for the presentation. As mentioned in the last article, the BackgroundWorker component is still a useful tool for keeping our UI responsive when we have a long-running process, especially when we want that process to interact with our UI (such as through progress notification). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |