Last week , I have been given tasks to create navigation tabs using INavigationAware in the SandBox App . There are a few things implemented once I applied the INavigationAware interface into the view model .
First , IsNavigationTarget is a bool method method that allows an existing view or view model to indicate whether it is able to handle the navigation request .
Then , OnNavigatedFrom method is to allow the previous view to save or deactivate any current events from EventAggregator. The OnNavigatedTo method is called when the view is initialized , to pass on data from the navigation parameters .
Also , the NavigationContext that prism provides is to receive parameters from the NavigationParameters class , that is passed from the RequestNavigate method .
Prism also provides the IRegionMemberLifetime interface that has a KeepAlive boolean , to control the views to set them whether to be deactivated or not .
Lastly , after the implementation of navigation activities . I created some tests for services in the project , restricting the deletion of table if foreign key exists .
