/// <summary>
        /// Helper function for common code. Creates the window and returns result.
        /// </summary>
        /// <param name="vm">View model.</param>
        /// <param name="windowTitle">Title of window.</param>
        /// <param name="message">Message to show in window.</param>
        /// <returns>Result.</returns>
        private static DialogResult DialogCommon(DialogWindowViewModelBase vm, string windowTitle, string message)
        {
            vm.WindowTitle = windowTitle;
            vm.BodyMessage = message;

            var d = new Windows.DialogWindow(vm);

            d.ShowDialog();
            return(vm.UserDialogResult);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DialogWindow"/> class.
        /// </summary>
        /// <param name="dataContext">ViewModel for window.</param>
        public DialogWindow(DialogWindowViewModelBase dataContext)
        {
            InitializeComponent();

            DataContext = dataContext;
        }