/// <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(); }
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; }
/// <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(); } }