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
Post a Comment