| 123456789101112131415161718192021222324252627 |
- using System;
- using System.Windows.Data;
- using System.Globalization;
- using System.Windows.Controls;
- using System.Collections.Generic;
- namespace SHJX.Service.Common.Converters
- {
- public class PasswordConverter : IMultiValueConverter
- {
- public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
- {
- Dictionary<string, PasswordBox> keyValues = new();
- foreach (var item in values)
- {
- var password = (PasswordBox)item;
- keyValues.Add(password.Name, password);
- }
- return keyValues;
- }
- public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|