WindowLogic

Name Value
Assembly Catel.MVVM
Namespace Catel.MVVM.Providers
Available on .NET Framework 4.5, .NET Framework 4.6
public class WindowLogic : LogicBase

Base types LogicBase

MVVM Provider behavior implementation for a window.

Fields

Constructors

WindowLogic(IView targetWindow, Type viewModelType, IViewModel viewModel)

Initializes a new instance of the WindowLogic class.

Parameters

Name Description
targetWindow The window this provider should take care of.
viewModelType Type of the view model.
viewModel The view model to inject.

Exceptions

Name Description
ArgumentNullException The targetWindow isnull.

Properties

ForceCloseAfterSettingDialogResult

Gets or sets a value indicating whether the logic should callClose immediately when theDialogResult is set. By default, theWindow class correctly closes the window when theDialogResult is set, but not all implementations work like this. The default value is false.

Methods

OnTargetViewUnloadedAsync(object sender, EventArgs e)

Called when TargetView has just been unloaded.

Parameters

Name Description
sender The sender.
e The instance containing the event data.

OnTargetWindowClosed(object sender, EventArgs e)

Called when the TargetWindow has been closed.

Remarks

Public to allow the generated ILGenerator to access this method.

OnViewModelClosedAsync(object sender, ViewModelClosedEventArgs e)

Called when the ViewModel is closed.

Parameters

Name Description
sender The sender.
e The ViewModelClosedEventArgs instance containing the event data.

Have a question about Catel? Use StackOverflow with the Catel tag!


Discussion