Gets the navigation service that the host of the page is using to manage navigation.
Assembly: PresentationFramework (in PresentationFramework.dll)
Pages often need to integrate with their host's navigation to provide in-page navigation support. However, because a page may not know what its host will be at run time, it cannot integrate directly with its host's navigation members to do so.
Instead, it can attempt to use a navigation service, which is a service that supports browser-style navigation and is encapsulated by the NavigationService class. You cannot create your own NavigationService instance, though. Instead, host types such as NavigationWindow, Frame, or a browser create their own NavigationService instance that you can access from the property.
The navigation service that is returned from the property is the instance of the NavigationService class that is managed by the first navigator up the visual tree. If one is not found, nullptr is returned, indicating a page's host does not support navigation.
The Window class does not support navigation and does not provide a navigation service.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)