Do you mean you could make it on view but not on pages?
If you want to navigate to this MyPage content page we will use:
MyPage page = new MyPage();
We accessed the root layout in this way.
x:Name couldn't be accessed outside the current page/view. We need to expose a public property in the class like:
public StackLayout RootLayout;
RootLayout = xamlRootLayout;
This RootLayout indicates a control in xaml:
Finally, the xaml control could be reached in this way.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies