NavigationLogicBase

Name Value
Assembly Catel.MVVM
Namespace Catel.MVVM.Providers
Available on .NET Framework 4.5, .NET Framework 4.6, Portable Class Libraries, Xamarin - Android, Xamarin - iOS
public abstract class NavigationLogicBase<T> : LogicBase where T : IView 

Base types LogicBase

Base class for pages or controls containing navigation logic.

Type Parameters

T Type of the control or page.

Fields

Constructors

Initializes a new instance of the PageLogic class.

Parameters

Name Description
targetPage The page this provider should take care of.
viewModelType Type of the view model.

Exceptions

Name Description
ArgumentNullException The targetPage isnull.

Properties

TargetPage

Gets the target page.

Methods

EnsureViewModel()

Ensures that there is a valid view model. This is a separate method because the view model can be constructed in the constructor, but also in the OnLoaded event because of the tombstoning capabilities of Windows Phone 7. If there already is a view model, this method will do nothing.

OnNavigatedAwayFromPage(NavigatedEventArgs e)

Called when the control has just been navigated away from the page.

Parameters

Name Description
e The NavigatedEventArgs instance containing the event data.

OnNavigatedToPage(NavigatedEventArgs e)

Called when the control has just been navigated to the page.

Parameters

Name Description
e The NavigatedEventArgs instance containing the event data.

OnNavigatingAwayFromPage(NavigatingEventArgs e)

Called when the control has just been navigated away from the page.

Parameters

Name Description
e The NavigatingEventArgs instance containing the event data.

OnTargetViewLoadedAsync(object sender, EventArgs e)

Called when the TargetView has just been loaded.

Parameters

Name Description
sender The sender.
e The instance containing the event data.

OnTargetViewUnloadedAsync(object sender, EventArgs e)

Called when the TargetView has just been unloaded.

Parameters

Name Description
sender The sender.
e The instance containing the event data.

Have a question about Catel? Use StackOverflow with the Catel tag!


Discussion