This is what the message box looks like:
I hereby call the messagebox
var result = MessageBoxTest.Show(ChartControl, "Text"); await result; Print("1=>" + result.Result);
public static async Task<MessageBoxResult> Show(ChartControl chartControl, string text, MessageBoxButton buttons = MessageBoxButton.OK) { if (chartControl == null) { return MessageBoxResult.None; } MessageBoxWindowTest msgBox = null; System.Windows.Threading.DispatcherOperation msgResult = null; msgResult = chartControl.Dispatcher.InvokeAsync(() => { msgBox = CreateMessageBox(chartControl, text, buttons); if (msgBox != null) { msgBox.Show(); return msgBox.MsgBoxResult; } return MessageBoxResult.None; }); await msgResult; return msgBox.MsgBoxResult; }
Comment