void SetTitleBinding()
 {
     if (string.IsNullOrEmpty(Title))
     {
         DocumentUIServiceBase.SetTitleBinding(window.RealWindow.Content, WindowBase.TitleProperty, window.RealWindow, true);
     }
 }
예제 #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());
        }