using System.Collections.Generic; namespace Xamarin.Forms.Platform.UWP { internal static class ViewExtensions { public static IEnumerable GetParentPages(this Page target) { var result = new List(); var parent = target.Parent as Page; while (!Application.IsApplicationOrNull(parent)) { result.Add(parent); parent = parent.Parent as Page; } return result; } } }