private void ExecuteGoToEditCommand()
        {
            MemberEditDialogViewModel vm = new MemberEditDialogViewModel(_selectedMember);

            MemberEditDialog d = new MemberEditDialog(vm);

            d.Owner = Application.Current.MainWindow;
            d.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            d.ShowDialog();
        }
Example #2
0
        /// <summary>
        ///     Add user function
        /// </summary>
        /// <param name="o"></param>
        private async void ExecuteRunAddMemberDialog(object o)
        {
            //let's set up a little MVVM, cos that's what the cool kids are doing:
            var view = new MemberEditDialog
            {
                DataContext = new UserInfo()
            };

            //show the dialog
            var result = await DialogHost.Show(view, "RootDialog", AddMemberDialogClosingEventHandler);

            //check the result...
            Console.WriteLine("Dialog was closed, the CommandParameter used to close it was: " + (result ?? "NULL"));
        }