MahApps/MahApps.Metro — pull request #1584 by BrunoJuchli (2014-10-17 11:22:09+00:00)
Title: Preventing deadlock on AppDomain.Unload by removing superfluous finalization logic which uses Dispatcher.

The FlipView and the MetroTabItem contain finalizer which don't clean-up unmanaged resources. All they do is deregister a local handler from a local event, which is quite superfluous. What's more, is that the deregistration was done through the dispatcher. This can lead to a deadlock when unloading an AppDomain (btw., the deadlock is resolved, after a while AppDomain.Unload throws an exception stating that it can't unload the domain).

The FlipView finalizer was originally introduced by commit b5aac16fd3773d95cfddc1eac65d9df1e8e8a1f5.
As far as i can tell it is not necessary to fix the issue which was handled by said commit [Fixed a bug where the FlipView was unloaded by the TabControl but it`s inner events weren't reattached when the Tabitem was switched back](https://github.com/MahApps/MahApps.Metro/commit/b5aac16fd3773d95cfddc1eac65d9df1e8e8a1f5)