Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

You're reading from  MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

Product type Book
Published in Aug 2012
Publisher Packt
ISBN-13 9781849683425
Pages 490 pages
Edition 1st Edition
Languages

Table of Contents (21) Chapters

MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF
Credits
Foreword
About the Authors
About the Reviewer
www.PacktPub.com
Preface
1. Presentation Patterns 2. Introduction to MVVM 3. Northwind – Foundations 4. Northwind—Services and Persistence Ignorance 5. Northwind—Commands and User Inputs 6. Northwind—Hierarchical View Model and IoC 7. Dialogs and MVVM 8. Workflow-based MVVM Applications 9. Validation 10. Using Non-MVVM Third-party Controls 11. MVVM Application Performance MVVM Frameworks
Binding at a Glance Index

Using BackgroundWorker


As we have seen, desktop applications have to be multi-threaded to be responsive. When multi-threading our applications, we spawn a new thread (or use the ThreadPool) and then when the background thread finishes executing, the background thread might need to notify the other threads (especially the UI thread). There are signalling constructs available in .NET, such as EventWaitHandle for thread synchronization, that we can use. We also frequently need to show the progress of execution of certain tasks to the user, using something like a progress bar or status bar. The .NET framework makes all of this possible, but it requires a lot of understanding of multithreading and code that is difficult to develop and maintain.

BackgroundWorker is an easier alternative to accomplishing the goals listed previously. It executes the operations on a background thread using the ThreadPool. BackgroundWorker also makes progress reporting to the UI thread easier, by providing a ProgressChanged...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime}