예제 #1
0
 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value is not string str)
     {
         return(Binding.DoNothing);
     }
     if (!ModKey.TryConvertExtensionToType(str, out var modType))
     {
         throw new ArgumentException($"String could not be converted to ModType: {str}");
     }
     return(modType);
 }