C# Класс Catel.MVVM.Views.ViewToViewModelMappingHelper

Helper class to fix ViewToViewModelMapping for IView.
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
InitializeViewModel void
OnViewModelChanged void
OnViewModelContainerPropertyChanged void
OnViewModelPropertyChanged void
TransferValue void
UninitializeViewModel void
UninitializeViewToViewModelMappings void

Открытые методы

Метод Описание
InitializeViewToViewModelMappings ( IViewModelContainer viewModelContainer ) : void

Initializes the ViewToViewModelMapping for the specified IViewModelContainer.

UninitializeViewToViewModelMappings ( IViewModelContainer viewModelContainer ) : void

Uninitializes the ViewToViewModelMapping for the specified IViewModelContainer.

ViewToViewModelMappingHelper ( IViewModelContainer viewModelContainer ) : System

Initializes a new instance of the ViewToViewModelMappingHelper class.

Защищенные методы

Метод Описание
TransferValueFromViewModelToView ( IViewModel viewModel, string viewPropertyName, string viewModelPropertyName ) : void

Transfers the value from a view model property to the view property. This method does nothing when viewModel is null.

This method does not check the type of the properties. If the types are incorrect, an exception will be thrown by the .NET Framework.

TransferValueFromViewToViewModel ( IViewModel viewModel, string viewPropertyName, string viewModelPropertyName ) : void

Transfers the value from a view property to the view model property. This method does nothing when viewModel is null.

This method does not check the type of the properties. If the types are incorrect, an exception will be thrown by the .NET Framework.

Приватные методы

Метод Описание
InitializeViewModel ( IViewModel viewModel ) : void

Initializes the specified view model.

OnViewModelChanged ( object sender, EventArgs e ) : void

Called when the view model on the view model container has changed.

OnViewModelContainerPropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Called when a property on the view model container has changed.

OnViewModelPropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Called when a property on the view model has changed.

TransferValue ( object source, string sourcePropertyName, object target, string targetPropertyName ) : void

Transfers a value from the source property to the target property.

This method does not check the type of the properties. If the types are incorrect, an exception will be thrown by the .NET Framework.

UninitializeViewModel ( IViewModel viewModel ) : void

Uninitializes the specified view model.

UninitializeViewToViewModelMappings ( ) : void

Uninitializes the ViewToViewModelMapping for the registered IViewModelContainer.

Описание методов

InitializeViewToViewModelMappings() публичный статический Метод

Initializes the ViewToViewModelMapping for the specified IViewModelContainer.
The is null.
public static InitializeViewToViewModelMappings ( IViewModelContainer viewModelContainer ) : void
viewModelContainer IViewModelContainer The view model container to initialize the mappings for.
Результат void

TransferValueFromViewModelToView() защищенный Метод

Transfers the value from a view model property to the view property. This method does nothing when viewModel is null.
This method does not check the type of the properties. If the types are incorrect, an exception will be thrown by the .NET Framework.
The is null or whitespace. The is null or whitespace.
protected TransferValueFromViewModelToView ( IViewModel viewModel, string viewPropertyName, string viewModelPropertyName ) : void
viewModel IViewModel The view model.
viewPropertyName string Name of the view property.
viewModelPropertyName string Name of the view model property.
Результат void

TransferValueFromViewToViewModel() защищенный Метод

Transfers the value from a view property to the view model property. This method does nothing when viewModel is null.
This method does not check the type of the properties. If the types are incorrect, an exception will be thrown by the .NET Framework.
The is null or whitespace. The is null or whitespace.
protected TransferValueFromViewToViewModel ( IViewModel viewModel, string viewPropertyName, string viewModelPropertyName ) : void
viewModel IViewModel The view model.
viewPropertyName string Name of the view property.
viewModelPropertyName string Name of the view model property.
Результат void

UninitializeViewToViewModelMappings() публичный статический Метод

Uninitializes the ViewToViewModelMapping for the specified IViewModelContainer.
The is null.
public static UninitializeViewToViewModelMappings ( IViewModelContainer viewModelContainer ) : void
viewModelContainer IViewModelContainer The view model container the uninitialize the mappings for.
Результат void

ViewToViewModelMappingHelper() публичный Метод

Initializes a new instance of the ViewToViewModelMappingHelper class.
The is null.
public ViewToViewModelMappingHelper ( IViewModelContainer viewModelContainer ) : System
viewModelContainer IViewModelContainer The view model container.
Результат System