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