public static async Task Show(User user) { Application.Current.Dispatcher.VerifyAccess(); var upw = new UserProfileWindow(); await upw.ProfilePage.Load(user); upw.Show(); }
public static void Show(User user) { if (!Application.Current.Dispatcher.CheckAccess()) { Application.Current.Dispatcher.Invoke(new Action(() => Show(user))); return; } var upw = new UserProfileWindow(); upw.ProfilePage.Load(user); upw.Show(); }