public static void Show(string message) { MessageWindow mw = new MessageWindow(); mw.OK.Visibility = Visibility.Visible; mw.WindowStartupLocation = WindowStartupLocation.CenterScreen; mw.messageText.Text = message; mw.ShowDialog(); }
public static void Show(Window owner,string message) { MessageWindow mw = new MessageWindow(); mw.messageText.Text = message; mw.OK.Visibility = Visibility.Visible; mw.Owner = owner; mw.ShowInTaskbar = false; mw.ShowDialog(); }
public static MessageBoxResult Show(Window owner, string message, MessageBoxButton btn) { MessageWindow mw = new MessageWindow(); mw.messageText.Text = message; mw.Owner = owner; if (btn == MessageBoxButton.OKCancel) { mw.OKCancel.Visibility = Visibility.Visible; mw.ShowDialog(); } return mw.mbr; }