void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { Frame rootFrame = Window.Current.Content as Frame; // if we are not on the logon page then we should check if the secure store locked itself if (rootFrame.CurrentSourcePageType != typeof(LogonPage)) { if (Globals.LogonCore != null) { if (!Globals.LogonCore.State.IsSecureStoreOpen) { RegistrationHelper.NavigateToLogonPage(rootFrame); } } } } }