public async static void CloseAll() { foreach (var child in PopupService._rootControl.Children) { if (child.GetType().Name == "PopupView") { PopupView pv = (PopupView)child; pv.Hide(); } } }
public async static void Close(UserControl viewToClose) { foreach (var child in PopupService._rootControl.Children) { if (child.GetType().Name == "PopupView") { PopupView pv = (PopupView)child; if (pv.MainContent.GetType().Name == viewToClose.GetType().Name) { pv.Hide(); return; } ; } } }