Table of Contents

Method GetRootChild

Namespace
Alternet.UI
Assembly
Alternet.UI.Maui.dll

GetRootChild(Page)

Retrieves the root child element of the specified Page.

public static VisualElement? GetRootChild(Page page)

Parameters

page Page

The Page from which to retrieve the root child element.

Returns

VisualElement

A VisualElement representing the root child of the specified Page, or null if the page does not have a root child or is not a supported type.

Remarks

This method supports ContentPage, NavigationPage, and Shell. For ContentPage, it returns the Content. For NavigationPage, it returns the content of the root page if the root page is a ContentPage. For Shell, it returns the content of the current page if the current page is a ContentPage.