public static async Task <bool> Show(string title, string message, MessageDialogType messageDialogType) { dialogManager = Locator.Current.GetService <IDialogManager>(); var vm = new MessageDialogViewModel(messageDialogType) { Title = title, Message = message }; var dialog = new DialogMessage { DataContext = vm }; observableSubs = Observable.Merge(vm.OkCommand, vm.CancelCommand) .Take(1) .Subscribe(r => OnClose(r)); return(await dialogManager.ShowChildDialogAsync <bool>(dialog)); }