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();
 }
Beispiel #2
0
        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());
        }
Beispiel #3
0
 public void Close(IDocumentContent documentContent, bool force = true)
 {
     CurrentDialogContentControl.Close(documentContent, force);
     CurrentDialogContentControl = null;
 }
 public void Close(IDocumentContent documentContent, bool force = true) {
     CurrentDialogContentControl.Close(documentContent, force);
     CurrentDialogContentControl = null;
 }