WPF – Loading Spinner Via MVVM and Attached Properties

added by ButtonChrome
11/13/2010 8:53:33 AM

0 Kicks, 401 Views

When I used to write a lot of Ajax for ASP.NET (many years ago) I quite like the feature whereby you could disable the page and show a ‘loading spinner’ while waiting for an update in the page. This is a great feature to have in WPF, so I have created a ViewModel with a ‘loading’ switch (bool), and an attached property that creates and displays the animated spinner (for the duration of the switch flag being true)