public void ShowToast(string title, string message = "") { Dispatcher.BeginInvoke(new Action(() => { Toast toast = new Toast(); toast.SetValues(title, message); gdMain.Children.Add(toast); })); }