C# 클래스 System.Windows.Mvvm.Services.Navigation.ViewModel

Represents the standard implementation of the IViewModel interface.
상속: IViewModel
파일 보기 프로젝트 열기: lecode-official/mvvm-framework

공개 메소드들

메소드 설명
Dispose ( ) : void

Disposes of the resources that the view model acquired.

OnActivateAsync ( ) : System.Threading.Tasks.Task

Is called when the view model is created (before the user is navigated to the view and before the OnNavigateTo even is called). After the view model was created, it is cached and reused until it is destroyed, therefore OnActivate is only called once in the life cycle of a view model.

OnDeactivateAsync ( ) : System.Threading.Tasks.Task

Is called when the view model gets deactivated. The view model only gets deactivated when the navigation stack of the window, that contains the view of this view model, is cleared, or when the windows, containing the view of this view model, is closed. Therefore OnDeactivate is only called once in the life cycle of a view model.

OnNavigateFromAsync ( NavigationEventArgs e ) : System.Threading.Tasks.Task

Is called before the view model is navigated away from. Other than OnDeactivate, OnNavigateFrom is called everytime the user navigates away from this view model.

OnNavigateToAsync ( NavigationEventArgs e ) : System.Threading.Tasks.Task

Is called before the view model is navigated to. Other than OnActivate, OnNavigateTo is called everytime the user navigates to this view model.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Performs the actual disposing logic by calling the custom disposal logic of the view model implementation.

메소드 상세

Dispose() 공개 메소드

Disposes of the resources that the view model acquired.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Performs the actual disposing logic by calling the custom disposal logic of the view model implementation.
protected Dispose ( bool disposing ) : void
disposing bool Determines whether managed or unmanaged objects are disposed of. If true managed and unmanaged resources must be disposed of otherwise only unmanaged resources must be disposed of.
리턴 void

OnActivateAsync() 공개 메소드

Is called when the view model is created (before the user is navigated to the view and before the OnNavigateTo even is called). After the view model was created, it is cached and reused until it is destroyed, therefore OnActivate is only called once in the life cycle of a view model.
public OnActivateAsync ( ) : System.Threading.Tasks.Task
리턴 System.Threading.Tasks.Task

OnDeactivateAsync() 공개 메소드

Is called when the view model gets deactivated. The view model only gets deactivated when the navigation stack of the window, that contains the view of this view model, is cleared, or when the windows, containing the view of this view model, is closed. Therefore OnDeactivate is only called once in the life cycle of a view model.
public OnDeactivateAsync ( ) : System.Threading.Tasks.Task
리턴 System.Threading.Tasks.Task

OnNavigateFromAsync() 공개 메소드

Is called before the view model is navigated away from. Other than OnDeactivate, OnNavigateFrom is called everytime the user navigates away from this view model.
public OnNavigateFromAsync ( NavigationEventArgs e ) : System.Threading.Tasks.Task
e NavigationEventArgs The event arguments, that allows the navigation to be cancelled.
리턴 System.Threading.Tasks.Task

OnNavigateToAsync() 공개 메소드

Is called before the view model is navigated to. Other than OnActivate, OnNavigateTo is called everytime the user navigates to this view model.
public OnNavigateToAsync ( NavigationEventArgs e ) : System.Threading.Tasks.Task
e NavigationEventArgs The event arguments, that allows the navigation to be cancelled.
리턴 System.Threading.Tasks.Task