C# Class Catel.MVVM.Views.ViewManager

Manager that can search for views belonging to a view model.
Inheritance: IViewManager
Show file Open project: Catel/Catel

Public Methods

Method Description
GetFirstOrDefaultInstance ( Type viewType ) : IView

Gets the first or default instance of the specified view type.

GetViewsOfViewModel ( IViewModel viewModel ) : IView[]

Gets the views of view model.

RegisterView ( IView view ) : void

Registers a view so it can be linked to a view model instance.

UnregisterView ( IView view ) : void

Unregisters a view so it can no longer be linked to a view model instance.

Private Methods

Method Description
OnViewModelChanged ( object sender, EventArgs eventArgs ) : void

Called when the view model of a view has changed.

SyncViewModelOfView ( IView view ) : void

Synchronizes the view model of view.

Method Details

GetFirstOrDefaultInstance() public method

Gets the first or default instance of the specified view type.
The is not of type .
public GetFirstOrDefaultInstance ( Type viewType ) : IView
viewType System.Type Type of the view.
return IView

GetViewsOfViewModel() public method

Gets the views of view model.
The is null.
public GetViewsOfViewModel ( IViewModel viewModel ) : IView[]
viewModel IViewModel The view model.
return IView[]

RegisterView() public method

Registers a view so it can be linked to a view model instance.
The is null.
public RegisterView ( IView view ) : void
view IView The view to register.
return void

UnregisterView() public method

Unregisters a view so it can no longer be linked to a view model instance.
The is null.
public UnregisterView ( IView view ) : void
view IView The view to unregister.
return void