When working with frameworks like Silverlight, WPF or Windows Forms you often encounter the need to ensure a piece of code runs on the UI thread. Below, I present a clean way to do this using the SynchronizationContext class.
Everybody that is doing XAML editing has hit this issue one moment in time – the editor is buggy. First of all – the designer is really useless. Second, if you keep editors open side-by-side you will eventually get a Visual Studio crash. Also from time to time you won’t be able to open the XAML file because apparently it is open but hidden. Finally, I would mention that the XAML editor is a lot slower than the other Visual Studio editors.
When working with Silverlight two-way binding (and not only there) you need to implement the INotifyPropertyChanged interface in order to notify any observers that the property values of the object have changed.