An Xamarin.Forms.INavigation that allows for navigation using the ancestral navigation implementor.
Use the Navigation property to perform navigation from any element. If the element has not yet been added to a tree which contains a navigation implementor, the actions are queued up until it is.
The following example navigates to a new page created in the callback of a buttons VisualElement.Activated event.
C# Example
partial class NavigationTest {
void BuildContent
{
Button button = new Button {Text = "Tap to Navigate"};
button.Activated += OnButtonActivated;
}
void OnButtonActivated (object sender, EventArgs args)
{
Button button = (Button) sender;
Page newPage = new ContentPage {
Content = new Label {Text = "Hello New Page"}
};
button.Navigation.Push (newPage);
}
}