Saxonite 1.2.11.3. Sandtrap.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// Identify the page fo rthis element.
|
||||
/// </summary>
|
||||
public static Page? GetPage(this Element element)
|
||||
{
|
||||
while (element != null)
|
||||
{
|
||||
if (element is Page) return element as Page;
|
||||
element = element.Parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user