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