static LoadedWeakEventManager GetCurrentManager()
        {
            var mt = typeof(LoadedWeakEventManager);

            var manager = ( LoadedWeakEventManager )WeakEventManager.GetCurrentManager(mt);

            if (manager == null)
            {
                manager = new LoadedWeakEventManager();
                WeakEventManager.SetCurrentManager(mt, manager);
            }

            return(manager);
        }
 public static void RemoveListener(FrameworkElement source, IWeakEventListener listener)
 {
     LoadedWeakEventManager
     .GetCurrentManager()
     .ProtectedRemoveListener(source, listener);
 }