c# - UWP check the current page for name or instance -


in uwp app launching protocol or toast. in onactivated method want check whether apps' mainview open or page showing. app.xaml.cs

i wanna like:

if mainpage not showing --> navigate(typeof(mainpage)); 

or

if main window not open since coming protocol or toast launch open frame , navigate mainpage. 

not sure how go it.

so i'm checking for

var frame = window.current.content frame;  if (frame != null) {     type whatpageisit = frame.sourcepagetype;     // handle page type } else {     // need in case window not open } 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -