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