Jeroen E
Jeroen E

Reputation: 57

Catel CancelAndCloseView repalced in version 4.3

In Catel 4.3 is the CancelAndCloseViewModel() obsolete.

I have to use the AsynchronousCommand instead.

So in constructor

CmdCancel = new AsynchronousCommand(OnCancel, () => !CmdCancel.IsExecuting)

private void OnCancel
{
  ??????
}

Then what?

Kind regards

Jeroen

Upvotes: 0

Views: 70

Answers (1)

Geert van Horrik
Geert van Horrik

Reputation: 5724

Use TaskCommand and use the async methods:

var cancelCommand = new TaskCommand(OnCancelExecuteAsync);

public async Task OnCancelExecuteAsync()
{
    await this.CancelAndCloseViewModel();
}

Upvotes: 1

Related Questions