public async Task <bool> WaitUntilClosedAsync() { var isAccepted = await Observable.Merge( AcceptButton.Events() .Click .Select(_ => true), CancelButton.Events() .Click .Select(_ => false)).FirstAsync(); return(isAccepted); }