public async Task<UICommand> ShowDialogAsync(IEnumerable<UICommand> dialogCommands, string title, string documentType, object viewModel, object parameter, object parentViewModel) { object view = CreateAndInitializeView(documentType, viewModel, parameter, parentViewModel, this); CurrentDialogContentControl = new DialogContentControl() { Content = view, Style = DialogStyle }; dialogCommands.Do(c => CurrentDialogContentControl.CommandsSource = c); if(title != null) CurrentDialogContentControl.Title = title; else DocumentUIServiceBase.SetTitleBinding(view, DialogContentControl.TitleProperty, CurrentDialogContentControl, true); return await CurrentDialogContentControl.ShowAsync(); }
public async Task <UICommand> ShowDialogAsync(IEnumerable <UICommand> dialogCommands, string title, string documentType, object viewModel, object parameter, object parentViewModel) { object view = CreateAndInitializeView(documentType, viewModel, parameter, parentViewModel, this); CurrentDialogContentControl = new DialogContentControl() { Content = view, Style = DialogStyle }; dialogCommands.Do(c => CurrentDialogContentControl.CommandsSource = c); if (title != null) { CurrentDialogContentControl.Title = title; } else { DocumentUIServiceBase.SetTitleBinding(view, DialogContentControl.TitleProperty, CurrentDialogContentControl, true); } return(await CurrentDialogContentControl.ShowAsync()); }
public void Close(IDocumentContent documentContent, bool force = true) { CurrentDialogContentControl.Close(documentContent, force); CurrentDialogContentControl = null; }