Exemplo n.º 1
0
        /// <summary>
        /// Initiates the loading.
        /// </summary>
        /// <returns>A <see cref="System.Windows.UIElement"/></returns>
        public UIElement InitiateLoading()
        {
            Logger.Debug("Instantiating the Splash Screen.");
            _splashScreen = _container.Resolve <SplashScreen> ();

            LayoutRoot = new Grid
            {
                VerticalAlignment   = VerticalAlignment.Stretch,
                HorizontalAlignment = HorizontalAlignment.Stretch
            };

            var shell = _container.Resolve <Shell>();

            new ConfigurationBehaviorService().Watch(shell);
            LayoutRoot.Children.Add(shell);
            LayoutRoot.Children.Add(_splashScreen);

            Logger.Debug("Setting the Splash Screen as the Root Visual");
            Application.Current.RootVisual = LayoutRoot;

            Logger.Debug("Initializing the client security manager.");
            _currentUserPermissionService.RegisterForPermissions(OnUserPermissionsChanged, true);
            _currentUserPermissionService.InitializeUserSession();

            return(LayoutRoot);
        }