protected virtual IDialogOption CreateDialogOption(string title, FrameworkElement view, object parameters,
                                                           DialogButtons buttons = DialogButtons.OkCancel)
        {
            var option = new DialogOption {
                Title = title, View = view, Parameters = parameters, Buttons = buttons
            };

            var viewTitle = view.CastAs <IViewTitle>();

            if (viewTitle != null && option.Title.IsNullOrEmpty())
            {
                option.Title = viewTitle.ViewTitle ?? viewTitle.ViewHeader;
            }

            return(option);
        }