You may have already tried this but I've just created a quick test, deriving a view model from Screen and overriding CanClose.
public class ShellViewModel : Screen
{
public override void CanClose(Action<bool> callback)
{
//if(some logic...)
callback(false); // will cancel close
}
}
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more