/// <summary>
        /// Register given handler to given event as a weak reference.
        /// </summary>
        /// <param name="sender">Object to register.</param>
        /// <param name="handler">Handler to register.</param>
        public static void RegisterSpatialReferenceChanged(GeoView sender, EventHandler <EventArgs> handler)
        {
            var listener = new WeakEventListener <GeoView, object, EventArgs>(sender)
            {
                OnEventAction  = (instance, source, eventArgs) => { handler.Invoke(source, eventArgs); },
                OnDetachAction = (instance, weakEventListener) => instance.SpatialReferenceChanged -= weakEventListener.OnEvent
            };

            sender.SpatialReferenceChanged += listener.OnEvent;
        }
        /// <summary>
        /// Register given handler to given event as a weak reference.
        /// </summary>
        /// <param name="sender">Object to register.</param>
        /// <param name="handler">Handler to register.</param>
        public static void RegisterNotifyCollectionChanged(INotifyCollectionChanged sender, NotifyCollectionChangedEventHandler handler)
        {
            var listener = new WeakEventListener <INotifyCollectionChanged, object, NotifyCollectionChangedEventArgs>(sender)
            {
                OnEventAction  = (instance, source, eventArgs) => { handler.Invoke(source, eventArgs); },
                OnDetachAction = (instance, weakEventListener) => instance.CollectionChanged -= weakEventListener.OnEvent
            };

            sender.CollectionChanged += listener.OnEvent;
        }
        /// <summary>
        /// Register given handler to given event as a weak reference.
        /// </summary>
        /// <param name="sender">Object to register.</param>
        /// <param name="handler">Handler to register.</param>
        public static void RegisterLoadable(ILoadable sender, EventHandler handler)
        {
            var listener = new WeakEventListener <ILoadable, object, EventArgs>(sender)
            {
                OnEventAction  = (instance, source, eventArgs) => { handler.Invoke(source, eventArgs); },
                OnDetachAction = (instance, weakEventListener) => instance.Loaded -= weakEventListener.OnEvent
            };

            sender.Loaded += listener.OnEvent;
        }
        /// <summary>
        /// Register given handler to given event as a weak reference.
        /// </summary>
        /// <param name="sender">Object to register.</param>
        /// <param name="handler">Handler to register.</param>
        public static void RegisterGeoViewHolding(GeoView sender, EventHandler <GeoViewInputEventArgs> handler)
        {
            var listener = new WeakEventListener <GeoView, object, GeoViewInputEventArgs>(sender)
            {
                OnEventAction  = (instance, source, eventArgs) => { handler.Invoke(source, eventArgs); },
                OnDetachAction = (instance, weakEventListener) => instance.GeoViewHolding -= weakEventListener.OnEvent
            };

            sender.GeoViewHolding += listener.OnEvent;
        }