public static async Task ShowEditDialog(Window owner)
        {
            try
            {
                var edit = new EditProjectsDialog
                {
                    Owner = owner,
                    WindowStartupLocation = WindowStartupLocation.CenterOwner
                };

                var viewModel = (EditProjectsDialogViewModel)edit.FindResource("EditProjectsDialogViewModel");
                await viewModel.LoadProjects();

                edit.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageDialog.ShowError(ex, "EditProjectsDialog.ShowEditDialog()");
            }
        }
Ejemplo n.º 2
0
 private async void OnEditProjectsClick(object sender, RoutedEventArgs e)
 {
     await EditProjectsDialog.ShowEditDialog(this);
 }