public static async Task <ViewDoctorsForm> CreateAsyncViewDoctorsForm() { ViewDoctorsForm form = new ViewDoctorsForm(); await form.InitializeAsync(); return(form); }
private async void ViewDoctorsBtn_Click(object sender, RoutedEventArgs e) { try { ViewDoctorsForm form = await ViewDoctorsForm.CreateAsyncViewDoctorsForm(); form.ShowDialog(); } catch (Exception) { } }