Interaction logic for WindowDialog.xaml
コード例 #1
0
 /// <summary>
 /// Shows a dialog.
 /// </summary>
 /// <param name="title">Title of the dialog.</param>
 /// <param name="dataContext">DataContext of the dialog.</param>
 /// <returns>Returns the dialog result.</returns>
 public bool? ShowDialog(string title, object dataContext)
 {
     var win = new WindowDialog();
     win.Title = title;
     win.DataContext = dataContext;
     win.ResizeMode = ResizeMode;
     return win.ShowDialog();
 }
コード例 #2
0
        /// <summary>
        /// Shows a dialog.
        /// </summary>
        /// <param name="title">Title of the dialog.</param>
        /// <param name="dataContext">DataContext of the dialog.</param>
        /// <returns>Returns the dialog result.</returns>
        public bool?ShowDialog(string title, object dataContext)
        {
            var win = new WindowDialog();

            win.Title       = title;
            win.DataContext = dataContext;
            win.ResizeMode  = ResizeMode;
            return(win.ShowDialog());
        }