public void Encrypt() { var computerNames = Parent.ParameterViewModels.Where(p => p.Editor == EditorOptions.ComputerName) .Select(p => p.Value) .Where(v => !v.IsNullOrEmpty()) .Distinct() .ToList(); var vm = new EncryptionViewModel(Value, computerNames); var result = DialogCommand.ShowDialog(vm); if (result == true) { Value = vm.EncryptedValue; Parameter.Encrypted = EncryptionOptions.Yes; RefreshEncryption(); } }