using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sarand.Net.Mobile.Maui.Utils { //======================================================================= public static class SamElementUtil { //------------------------------------------------------------------- /// /// Identify the page fo rthis element. /// public static Page? GetPage(this Element element) { while (element != null) { if (element is Page) return element as Page; element = element.Parent; } return null; } //------------------------------------------------------------------- } //======================================================================= }