C# Class Catel.MVVM.Providers.WindowLogic

MVVM Provider behavior implementation for a window.
Inheritance: LogicBase
Afficher le fichier Open project: Catel/Catel Class Usage Examples

Private Properties

Свойство Type Description
InvokeCloseDynamically void

Méthodes publiques

Méthode Description
OnTargetViewUnloadedAsync ( object sender, EventArgs e ) : System.Threading.Tasks.Task

Called when LogicBase.TargetView has just been unloaded.

OnTargetWindowClosed ( ) : void

Called when the TargetWindow has been closed.

Public to allow the generated ILGenerator to access this method.

OnViewModelClosedAsync ( object sender, ViewModelClosedEventArgs e ) : System.Threading.Tasks.Task

Called when the LogicBase.ViewModel is closed.

WindowLogic ( IView targetWindow, Type viewModelType = null, IViewModel viewModel = null ) : System

Initializes a new instance of the WindowLogic class.

Méthodes protégées

Méthode Description
SetDataContext ( object newDataContext ) : void

Sets the data context of the target control. This method is abstract because the real logic implementation knows how to set the data context (for example, by using an additional data context grid).

Private Methods

Méthode Description
InvokeCloseDynamically ( ) : void

Invokes the close method on the window dynamically.

Method Details

OnTargetViewUnloadedAsync() public méthode

Called when LogicBase.TargetView has just been unloaded.
public OnTargetViewUnloadedAsync ( object sender, EventArgs e ) : System.Threading.Tasks.Task
sender object The sender.
e System.EventArgs The instance containing the event data.
Résultat System.Threading.Tasks.Task

OnTargetWindowClosed() public méthode

Called when the TargetWindow has been closed.
Public to allow the generated ILGenerator to access this method.
public OnTargetWindowClosed ( ) : void
Résultat void

OnViewModelClosedAsync() public méthode

Called when the LogicBase.ViewModel is closed.
public OnViewModelClosedAsync ( object sender, ViewModelClosedEventArgs e ) : System.Threading.Tasks.Task
sender object The sender.
e ViewModelClosedEventArgs The instance containing the event data.
Résultat System.Threading.Tasks.Task

SetDataContext() protected méthode

Sets the data context of the target control. This method is abstract because the real logic implementation knows how to set the data context (for example, by using an additional data context grid).
protected SetDataContext ( object newDataContext ) : void
newDataContext object The new data context.
Résultat void

WindowLogic() public méthode

Initializes a new instance of the WindowLogic class.
The is null.
public WindowLogic ( IView targetWindow, Type viewModelType = null, IViewModel viewModel = null ) : System
targetWindow IView The window this provider should take care of.
viewModelType System.Type Type of the view model.
viewModel IViewModel The view model to inject.
Résultat System