public static void MessageBosShow(string msg, Window parent) { MessageBoxCustom messageBoxCustom = new MessageBoxCustom(); messageBoxCustom.DataContext = msg; messageBoxCustom.ShowDialog(); WindowShow(messageBoxCustom, parent); }
/// <summary> /// 使用的 已经注入的 window父窗口 /// </summary> /// <param name="msg"></param> public static bool MessageBoxShow(string msg, bool textEditable = false, Visibility showFalse = Visibility.Hidden) { messageBoxCustom = new MessageBoxCustom(); messageBoxCustom.MsgTextBox.Text = msg; messageBoxCustom.NoButton.Visibility = showFalse; messageBoxCustom.MsgTextBox.IsEnabled = textEditable; //messageBoxCustom.ShowDialog(); WindowShow(messageBoxCustom, Window); return(messageBoxCustom.IsResult); }