1

I'm trying to close my Caliburn window but unsure how to use it.

CanClose expects one item in it's parameter Parameter 1 - Action callback

I'm simply trying to use the function this.CanClose() but unsure what goes inbetween the parenthesis

public void closeWindow()
{
    this.CanClose();
}

public override void CanClose(Action<bool> callback)
{
    base.CanClose(callback);
}
Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317
Master
  • 2,038
  • 2
  • 27
  • 77

2 Answers2

0

You can use the callback like this:

CanClose( p => {  DoSomething(); } );
Sievajet
  • 3,443
  • 2
  • 18
  • 22
0

You should insert callback method as parameter.

this.CanClose(MyMethod);
Yuri Dorokhov
  • 716
  • 5
  • 24