/// <summary> /// Shows a dialog box with the specified parameters. /// </summary> /// <param name="owner">The creator of this messagebox, on which we will center this.</param> /// <param name="text">The body text.</param> /// <param name="caption">The window caption.</param> /// <param name="buttons">The buttons choices to display</param> /// <param name="icon">The icon to display.</param> /// <returns>The result based on the button pressed.</returns> public static MessageBoxResult Show(Window owner, String text, String caption, MessageBoxButton buttons, MessageBoxImage icon) { ownerPtr = new WindowInteropHelper(owner).Handle; CenteredDialogBox.Initialize(); return(MessageBox.Show(owner, text, caption, buttons, icon)); }
/// <summary> /// Shows a dialog box with the specified parameters. /// </summary> /// <param name="text">The body text.</param> /// <param name="caption">The window caption.</param> /// <param name="buttons">The buttons choices to display</param> /// <param name="icon">The icon to display.</param> /// <returns>The result based on the button pressed.</returns> public static MessageBoxResult Show(String text, String caption, MessageBoxButton buttons, MessageBoxImage icon) { CenteredDialogBox.Initialize(); return(MessageBox.Show(text, caption, buttons, icon)); }