예제 #1
0
        /// <summary>
        /// Initializes the <see cref="Application.RootVisual"/> property.
        /// The initial UI will be displayed before the LoadUser operation has completed.
        /// The LoadUser operation will cause user to be logged in automatically if using Windows authentication or if the user had selected the "Keep me signed in" option on a previous login.
        /// </summary>
        protected virtual void InitializeRootVisual()
        {
            var busyIndicator =
                new Controls.BusyIndicator
                {
                    HorizontalContentAlignment = HorizontalAlignment.Stretch,
                    VerticalContentAlignment = VerticalAlignment.Stretch,
                };

            this.RootVisual = busyIndicator;
            AppViewModel.Instance.Initialized += (o, e) => ((Controls.BusyIndicator)RootVisual).Content = new MainPage();
            LoginStatus.OpenLoginWindow();
        }
예제 #2
0
        protected override DependencyObject CreateShell()
        {
            var shell = Container.Resolve<Shell>();
            var busyIndicator = new Controls.BusyIndicator
            {
                Content = shell,
                HorizontalContentAlignment = HorizontalAlignment.Stretch,
                VerticalContentAlignment = VerticalAlignment.Stretch
            };

            WebContext.Current.Authentication.LoggedIn += PublishUserRoles;
            WebContext.Current.Authentication.LoggedOut += PublishUserRoles;

            Application.Current.RootVisual = busyIndicator;
            return busyIndicator;
        }
예제 #3
0
        /// <summary>
        /// Initializes the <see cref="Application.RootVisual"/> property.
        /// The initial UI will be displayed before the LoadUser operation has completed.
        /// The LoadUser operation will cause user to be logged in automatically if using Windows authentication or if the user had selected the "Keep me signed in" option on a previous login.
        /// </summary>
        protected virtual void InitializeRootVisual()
        {
            if (IsRunningOutOfBrowser)
            {
                CheckAndDownloadUpdateAsync();
                var busyIndicator = new Controls.BusyIndicator
                {
                    Content = new MainPage(),
                    HorizontalContentAlignment = HorizontalAlignment.Stretch,
                    VerticalContentAlignment = VerticalAlignment.Stretch
                };

                RootVisual = busyIndicator;
            }
            else
            {
                RootVisual = new Browser();
            }
        }