public void Show(MsgBoxEvent func = null, string title = "", string contenttext = "", Visibility?back = null, string[] buttonname = null) { Dispatcher.Invoke(() => { if (title != null) { Title = title; } if (contenttext != null) { Text = contenttext; } if (back.HasValue) { Back = back.Value; } if (buttonname != null) { SetButtons(buttonname); } Visibility = Visibility.Visible; }); OnceEvent.Add(func); }
public MsgBox AddOnceEvent(MsgBoxEvent func) { OnceEvent.Add(func); return(this); }