C# 클래스 Catel.MVVM.Providers.UserControlLogic

MVVM Provider behavior implementation for a user control.
상속: LogicBase
파일 보기 프로젝트 열기: Catel/Catel

Private Properties

프로퍼티 타입 설명
ClearWarningsAndErrorsForObject void
CloseAndDisposeViewModelAsync Task
CreateViewModelWrapper void
GetViewModelResultValueFromUnloadBehavior bool?
OnParentViewModelCancelingAsync Task
OnParentViewModelClosingAsync Task
OnParentViewModelContainerLoading void
OnParentViewModelContainerUnloading void
OnParentViewModelContainerViewModelChanged void
OnParentViewModelSavingAsync Task
OnTargetControlContentChanged void
RegisterViewModelAsChild void
SubscribeToParentViewModel void
SubscribeToParentViewModelContainer void
UnregisterViewModelAsChild void
UnsubscribeFromParentViewModel void
UnsubscribeFromParentViewModelContainer void
UpdateDataContextToUseViewModelAsync Task
UserControlLogic System

공개 메소드들

메소드 설명
OnTargetViewDataContextChanged ( object sender, Catel e ) : void

Called when the DataContext property of the TargetView has changed.

OnTargetViewLoadedAsync ( object sender, EventArgs e ) : Task

Called when the TargetView has just been loaded.

OnTargetViewUnloadedAsync ( object sender, EventArgs e ) : Task

Called when the TargetView has just been unloaded.

UserControlLogic ( IView targetView, Type viewModelType = null, IViewModel viewModel = null ) : System

Initializes a new instance of the UserControlLogic class.

보호된 메소드들

메소드 설명
OnViewLoadedManagerLoading ( object sender, ViewLoadEventArgs e ) : void

Called when the view manager is loading.

OnViewLoadedManagerUnloading ( object sender, ViewLoadEventArgs e ) : void

Called when the view manager is unloading.

OnViewModelChanged ( ) : void

Called when the LogicBase.ViewModel property has just been changed.

OnViewModelChanging ( ) : void

Called when the LogicBase.ViewModel property is about to change.

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).

비공개 메소드들

메소드 설명
ClearWarningsAndErrorsForObject ( object obj ) : void

Clears the warnings and errors for the specified object.

Since there is a "bug" in the .NET Framework (DataContext issue), this method clears the current warnings and errors in the InfoBarMessageControl if available.

CloseAndDisposeViewModelAsync ( bool result ) : Task

Closes and disposes the current view model.

CreateViewModelWrapper ( bool checkIfWrapped = true ) : void

Creates the view model wrapper.

GetViewModelResultValueFromUnloadBehavior ( ) : bool?

Gets the view model result value based on the UnloadBehavior property so it can be used for the CloseAndDisposeViewModelAsync method.

OnParentViewModelCancelingAsync ( object sender, CancelingEventArgs e ) : Task

Handles the Canceling event of the parent ViewModel.

OnParentViewModelClosingAsync ( object sender, EventArgs e ) : Task

Called when Closing event of the parent ViewModel.

OnParentViewModelContainerLoading ( object sender, EventArgs e ) : void
OnParentViewModelContainerUnloading ( object sender, EventArgs e ) : void
OnParentViewModelContainerViewModelChanged ( object sender, EventArgs e ) : void

Handles the ViewModelChanged event of the parent ViewModel container.

OnParentViewModelSavingAsync ( object sender, SavingEventArgs e ) : Task

Handles the Saving event of the parent ViewModel.

OnTargetControlContentChanged ( object sender, PropertyChangedEventArgs e ) : void

Called when the content of the target control has changed.

RegisterViewModelAsChild ( ) : void

Registers the view model as child on the parent view model.

SubscribeToParentViewModel ( IViewModel parentViewModel ) : void

Subscribes to a parent view model.

SubscribeToParentViewModelContainer ( ) : void

Subscribes to the parent view model container.

UnregisterViewModelAsChild ( ) : void

Unregisters the view model as child on the parent view model.

UnsubscribeFromParentViewModel ( ) : void

Unsubscribes from a parent view model.

UnsubscribeFromParentViewModelContainer ( ) : void

Unsubscribes from the parent view model container.

UpdateDataContextToUseViewModelAsync ( object newDataContext ) : Task

Updates the data context to use view model.

UserControlLogic ( ) : System

Initializes static members of the UserControlLogic class.

메소드 상세

OnTargetViewDataContextChanged() 공개 메소드

Called when the DataContext property of the TargetView has changed.
public OnTargetViewDataContextChanged ( object sender, Catel e ) : void
sender object The sender.
e Catel The instance containing the event data.
리턴 void

OnTargetViewLoadedAsync() 공개 메소드

Called when the TargetView has just been loaded.
public OnTargetViewLoadedAsync ( object sender, EventArgs e ) : Task
sender object The sender.
e EventArgs The instance containing the event data.
리턴 Task

OnTargetViewUnloadedAsync() 공개 메소드

Called when the TargetView has just been unloaded.
public OnTargetViewUnloadedAsync ( object sender, EventArgs e ) : Task
sender object The sender.
e EventArgs The instance containing the event data.
리턴 Task

OnViewLoadedManagerLoading() 보호된 메소드

Called when the view manager is loading.
protected OnViewLoadedManagerLoading ( object sender, ViewLoadEventArgs e ) : void
sender object The sender.
e ViewLoadEventArgs The instance containing the event data.
리턴 void

OnViewLoadedManagerUnloading() 보호된 메소드

Called when the view manager is unloading.
protected OnViewLoadedManagerUnloading ( object sender, ViewLoadEventArgs e ) : void
sender object The sender.
e ViewLoadEventArgs The instance containing the event data.
리턴 void

OnViewModelChanged() 보호된 메소드

Called when the LogicBase.ViewModel property has just been changed.
protected OnViewModelChanged ( ) : void
리턴 void

OnViewModelChanging() 보호된 메소드

Called when the LogicBase.ViewModel property is about to change.
protected OnViewModelChanging ( ) : void
리턴 void

SetDataContext() 보호된 메소드

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.
리턴 void

UserControlLogic() 공개 메소드

Initializes a new instance of the UserControlLogic class.
The is null.
public UserControlLogic ( IView targetView, Type viewModelType = null, IViewModel viewModel = null ) : System
targetView IView The target control.
viewModelType Type Type of the view model.
viewModel IViewModel The view model.
리턴 System