public async Task <ContentDialogResult> ShowAsync(ContentDialog dialog, TimeSpan?timeout = null, CancellationToken?token = null) { if (_tokenSource is null) { _tokenSource = new CancellationTokenSource(); } var tk = token ?? _tokenSource.Token; return(await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync(tk), timeout, tk)); }
public async Task <IUICommand> ShowAsync(MessageDialog dialog, TimeSpan?timeout = null, CancellationToken?token = null) { if (_tokenSource is null) { _tokenSource = new CancellationTokenSource(); } var tk = token ?? _tokenSource.Token; return(await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync().AsTask(tk), timeout, tk)); }
public async Task <MessageBoxResult> ShowAsync(TimeSpan?timeout = null, CancellationToken?token = null) { var dialog = new ContentDialog { Content = Text, RequestedTheme = RequestedTheme, }; SetupButtons(dialog); var result = await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync(), timeout, token); return(DetermineResult(result)); }
public async Task <IUICommand> ShowAsync(MessageDialog dialog, TimeSpan?timeout = null, CancellationToken?token = null) { return(await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync(), timeout, token)); }
public async Task <ContentDialogResult> ShowAsync(ContentDialog dialog, TimeSpan?timeout = null, CancellationToken?token = null) { return(await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync(), timeout, token)); }