c# - Regain focus after flyout closed in a Store App -
i have flyout page use login. store username in localsettings , fine point. after login want pagetitle of page like: "welcome: " + username. (where username stored in localsettings).
this works. after reloaded mainpage example going page , again or when close entire app , start again. doesn't work right away after "login in" localsettings being loaded when page started not when running.
is there way "reload" mainpage after flyout closes? there can execute when mainpage gains focus? might there method regaining focus(if can't find it).
this (a part of) flyout page store variables in localsettings:
localsettings.values["settingusername"] = tbusername.text; localsettings.values["settingpassword"] = tbpassword.text;
*note : frame.navigate(typeof(page) not work. since flyouts doesn't support that.
i found solution, ill share here if else ever needs it. in c# store apps there checks if screen got focus. add method add code of page want check if has focus (or gained focus).
protected override void ongotfocus(routedeventargs e) { base.ongotfocus(e); }
Comments
Post a Comment