public virtual void OnViewRegistered(object sender, ViewRegisteredEventArgs e)
 {
     if (e.RegionName == this.Region.Name)
     {
         AddViewIntoRegion(e.GetView());
     }
 }
        public virtual void OnViewRegistered(object sender, ViewRegisteredEventArgs e)
        {
            if (e == null) throw new System.ArgumentNullException("e");

            if (e.RegionName == this.Region.Name) {
                AddViewIntoRegion(e.GetView());
            }
        }
        public void OnViewRegistered(object sender, ViewRegisteredEventArgs e)
        {
            var view = e.GetView() as IActiveAware;

            if (view != null)
            {
                // NOTE: This could cause memory leaks! Consider using weak event managers or remove handler when removing the view.
                view.IsActiveChanged += this.OnViewIsActiveChanged;
            }
        }
 public virtual void OnViewRegistered(object sender, ViewRegisteredEventArgs e)
 {
     if (e == null)
     {
         throw new System.ArgumentNullException("e");
     }
     if (e.RegionName == this.Region.Name)
     {
         AddViewIntoRegion(e.GetView());
     }
 }
        /// <summary>
        /// Handler of the event that fires when a new viewtype is registered to the registry.
        /// </summary>
        /// <remarks>Although this is a public method to support Weak Delegates in Silverlight, it should not be called by the user.</remarks>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public virtual void OnViewRegistered(object sender, ViewRegisteredEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            if (e.RegionName == Region.Name)
            {
                AddViewIntoRegion((VisualElement)e.GetView());
            }
        }