Xamarin.Forms Guides | Samples

Xamarin.Forms.VisualElement.Navigation Property

Gets the context aware navigation interface for the element.


public INavigation Navigation { get; }


An 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);


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,,,