Class NavigationService
A service that provides methods related to navigation.
public class NavigationService : INavigationService
- Inheritance
-
NavigationService
- Implements
- Inherited Members
- Extension Methods
Constructors
NavigationService(INavigationViewPageProvider)
A service that provides methods related to navigation.
public NavigationService(INavigationViewPageProvider pageProvider)
Parameters
pageProvider
INavigationViewPageProvider
Properties
NavigationControl
Gets or sets the control representing navigation.
protected INavigationView? NavigationControl { get; set; }
Property Value
Methods
GetNavigationControl()
Provides direct access to the control responsible for navigation.
public INavigationView GetNavigationControl()
Returns
- INavigationView
Instance of the INavigationView control.
GoBack()
Navigates the NavigationView to the previous journal entry.
public bool GoBack()
Returns
Navigate(string)
Lets you navigate to the selected page based on it's tag. Should be used with INavigationViewPageProvider.
public bool Navigate(string pageTag)
Parameters
pageTag
string
Returns
Navigate(string, object?)
Lets you navigate to the selected page based on it's tag. Should be used with INavigationViewPageProvider.
public bool Navigate(string pageTag, object? dataContext)
Parameters
Returns
Navigate(Type)
Lets you navigate to the selected page based on it's type. Should be used with INavigationViewPageProvider.
public bool Navigate(Type pageType)
Parameters
pageType
TypeType
of the page.
Returns
Navigate(Type, object?)
Lets you navigate to the selected page based on it's type, Should be used with INavigationViewPageProvider.
public bool Navigate(Type pageType, object? dataContext)
Parameters
Returns
NavigateWithHierarchy(Type)
Synchronously adds an element to the navigation stack and navigates current navigation Frame to the
public bool NavigateWithHierarchy(Type pageType)
Parameters
pageType
TypeType of control to be synchronously added to the navigation stack
Returns
NavigateWithHierarchy(Type, object?)
Synchronously adds an element to the navigation stack and navigates current navigation Frame to the
public bool NavigateWithHierarchy(Type pageType, object? dataContext)
Parameters
pageType
TypeType of control to be synchronously added to the navigation stack
dataContext
objectDataContext object
Returns
SetNavigationControl(INavigationView)
Lets you attach the control that represents the INavigationView.
public void SetNavigationControl(INavigationView navigation)
Parameters
navigation
INavigationViewInstance of the INavigationView.
ThrowIfNavigationControlIsNull()
protected void ThrowIfNavigationControlIsNull()